-
Notifications
You must be signed in to change notification settings - Fork 780
Closed
Labels
Description
Summary
Currently the code of the mempool reactor makes calls directly to CListMempool's methods that are not part of the Mempool interface. A clear separation of concerns will help introduce future improvements to the gossip protocol in the reactor, to modularize the mempool components, and to have multiple mempool implementations if we need to.
Specifically, in the mempool reactor:
NewReactortakes aCListMempoolas a parameter, instead of an interfaceMempool,- there are calls to implementation specific methods such as
TxsWaitChanandTxsFrontfor iterating throughCListMempool's entries, and also toSetLogger, - there are calls to methods
NextWaitChanandNextfrommempoolTx, which is the data structure used as entries in the listCListMempool.
DoD
- Define and implement a clear
Mempoolinterface, so that the reactor only interacts with the mempool implementation through the interface methods.
Reactions are currently unavailable