maflcko / bitcoin-core

MIT License
26 stars 12 forks source link

net: Make m_mempool optional in PeerManager #59

Closed sriramdvt closed 3 years ago

sriramdvt commented 3 years ago

Make m_mempool an optional pointer in PeerManager, instead of a reference. This is a prerequisite for the introduction of a -nomempool option.

To test that the null-pointer-dereference checks in PeerManagerImpl work, build the test-peerman-mempool-ptr branch that does not have a mempool initialized, and run it on signet/testnet (the functional tests would not work on test-peerman-mempool-ptr since the mempool is absent).

maflcko commented 3 years ago

Closing, as this is upstream now