aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-07-16 08:07:12 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-07-16 08:07:25 +0200
commitaffed844babde7ea3647178f9e8c6088de1bb7a2 (patch)
tree3bfc7b255b229f139aeb68e6e8282f1d160dede9 /src/test/fuzz
parent3864219d4074d289799634378d85cccbcc2e6e56 (diff)
parent0c8461a88ed66a1f70559fc96646708949b17e4b (diff)
Merge #19174: refactor: replace CConnman pointers by references in net_processing.cpp
0c8461a88ed66a1f70559fc96646708949b17e4b refactor: 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: utACK 0c8461a88ed66a1f70559fc96646708949b17e4b MarcoFalke: ACK 0c8461a88ed66a1f70559fc96646708949b17e4b 🕧 Tree-SHA512: 79dc05144bcfb5e0bbc62180285aadcc6199f044fa3016c0f54f7b7f45037415260970037bd63b18fafefb8aef448549dae14b780bafb540fa2373f493a17f71
Diffstat (limited to 'src/test/fuzz')
-rw-r--r--src/test/fuzz/process_message.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp
index fa8d67059c..9e40d5cd55 100644
--- a/src/test/fuzz/process_message.cpp
+++ b/src/test/fuzz/process_message.cpp
@@ -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&) {
}