mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 16:53:52 +02:00
Merge #19174: refactor: replace CConnman pointers by references in net_processing.cpp
0c8461a88erefactor: replace CConnman pointers by references in net_processing.cpp (Sebastian Falbesoner) Pull request description: This is a follow-up to the recently merged PR https://github.com/bitcoin/bitcoin/pull/19053, replacing ~~two more types of~~ one more type of pointer (CConnman) by references to increase the code quality -- pointers should either check for `nullptr` or be replaced by references, and the latter strategy seems to be more reasonable. Again, to keep the review burden managable, the changes are kept simple, * only tackling `CConnman*` ~~and `BanMan*`~~ pointers * only within the net_processing module, i.e. no changes that would need adaption in other modules * keeping the names of the variables as they are ACKs for top commit: jnewbery: utACK0c8461a88eMarcoFalke: ACK0c8461a88e🕧 Tree-SHA512: 79dc05144bcfb5e0bbc62180285aadcc6199f044fa3016c0f54f7b7f45037415260970037bd63b18fafefb8aef448549dae14b780bafb540fa2373f493a17f71
This commit is contained in:
@@ -38,7 +38,7 @@ void ProcessMessage(
|
||||
const CChainParams& chainparams,
|
||||
ChainstateManager& chainman,
|
||||
CTxMemPool& mempool,
|
||||
CConnman* connman,
|
||||
CConnman& connman,
|
||||
BanMan* banman,
|
||||
const std::atomic<bool>& interruptMsgProc);
|
||||
|
||||
@@ -89,7 +89,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
try {
|
||||
ProcessMessage(p2p_node, random_message_type, random_bytes_data_stream, GetTime<std::chrono::microseconds>(),
|
||||
Params(), *g_setup->m_node.chainman, *g_setup->m_node.mempool,
|
||||
g_setup->m_node.connman.get(), g_setup->m_node.banman.get(),
|
||||
*g_setup->m_node.connman, g_setup->m_node.banman.get(),
|
||||
std::atomic<bool>{false});
|
||||
} catch (const std::ios_base::failure&) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user