Closed maflcko closed 1 year ago
To break this down into smaller tasks:
AddArg
if
checks) need to be added. This is needed because C++ doesn't check for nullptr dereference at compile time. At runtime it is UB and it is detectable with sanitizers (Asan or valgrind). For example Assert(node.mempool)
or *node.mempool
may need to be adjusted with guards.git grep '\<node.mempool'
to find instances all instances in the codebase that may need fixups.
The mempool is required for the Bitcoin network to function properly. Miners use it to select transaction for the next block and non-miner network nodes use it to accept/reject txs for relay.
However, if the node is not a miner nor wishes to participate in tx-relay, the mempool can be omitted. This hardens the node operation because less code runs in production and the node may be less susceptible to DoS attacks. For example, a user that is only interested in confirmed transactions, may wish to disable the mempool.
Moreover, the new setting encourages modularization within the software project.
A new boolean
-initmempool
setting should be added (default: True) to allow the mempool to be never initialized.Useful skills:
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.