mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 16:24:48 +02:00
Merge #17997: refactor: Remove mempool global from net
fa7fea3654refactor: Remove mempool global from net (MarcoFalke) Pull request description: To increase modularisation and simplify testing, remove the mempool global from net in favour of a mempool member. This is done in the same way it was done for the connection manager global. ACKs for top commit: jnewbery: code review ACKfa7fea3654Tree-SHA512: 0e3e1eefa8d6e46367bc6991d5f36c636b15ae4a3bda99b6fe6715db3240771c3d87943c6eb257d69f31929fa2f1d0973e14fc9d1353a27551dbe746eae36857
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman* connman, BanMan* banman, const std::atomic<bool>& interruptMsgProc);
|
||||
bool ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CTxMemPool& mempool, CConnman* connman, BanMan* banman, const std::atomic<bool>& interruptMsgProc);
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -85,7 +85,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
p2p_node.SetSendVersion(PROTOCOL_VERSION);
|
||||
g_setup->m_node.peer_logic->InitializeNode(&p2p_node);
|
||||
try {
|
||||
(void)ProcessMessage(&p2p_node, random_message_type, random_bytes_data_stream, GetTimeMillis(), Params(), g_setup->m_node.connman.get(), g_setup->m_node.banman.get(), std::atomic<bool>{false});
|
||||
(void)ProcessMessage(&p2p_node, random_message_type, random_bytes_data_stream, GetTimeMillis(), Params(), *g_setup->m_node.mempool, g_setup->m_node.connman.get(), g_setup->m_node.banman.get(), std::atomic<bool>{false});
|
||||
} catch (const std::ios_base::failure& e) {
|
||||
const std::string exception_message{e.what()};
|
||||
const auto p = EXPECTED_DESERIALIZATION_EXCEPTIONS.find(exception_message);
|
||||
|
||||
Reference in New Issue
Block a user