From a3bee9c8eca8b8b3edb55ed6867b3792ccf39414 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 15 Mar 2021 17:36:13 +0100 Subject: [PATCH] Merge #21424: Net processing: Tidy up CNodeState ctor 6927933782acb9b158787e6f35debb916793f6b1 [net processing] Add ChainSyncTimeoutState default initializers (John Newbery) 55966e0cc03f0e380d21a9434b048d4d515b6729 [net processing] Remove CNodeState ctor body (John Newbery) Pull request description: This addresses the two outstanding review comments from #21370. ACKs for top commit: practicalswift: cr ACK 6927933782acb9b158787e6f35debb916793f6b1: patch looks correct hebasto: ACK 6927933782acb9b158787e6f35debb916793f6b1, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: b3ef5c8a096e447887df255406b3a760f01c73e2b942374595416b4b4031fc69b89cd93168c45040489d581f340b2a62d3fbabd207d4307f587c00a7a7daacd1 --- src/net_processing.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 6511ed614b..5670e5f3eb 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -826,7 +826,7 @@ struct CNodeState { bool m_protect{false}; }; - ChainSyncTimeoutState m_chain_sync{0, nullptr, false, false}; + ChainSyncTimeoutState m_chain_sync; //! Time of last new block announcement int64_t m_last_block_announcement{0}; @@ -900,11 +900,7 @@ struct CNodeState { //! A rolling bloom filter of all announced tx CInvs to this peer. CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001}; - CNodeState(bool is_inbound) : - m_is_inbound(is_inbound) - { - m_recently_announced_invs.reset(); - } + CNodeState(bool is_inbound) : m_is_inbound(is_inbound) {} }; // Keeps track of the time (in microseconds) when transactions were requested last time