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
This commit is contained in:
MarcoFalke 2021-03-15 17:36:13 +01:00 committed by Konstantin Akimov
parent aab2a665c3
commit a3bee9c8ec
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -826,7 +826,7 @@ struct CNodeState {
bool m_protect{false}; bool m_protect{false};
}; };
ChainSyncTimeoutState m_chain_sync{0, nullptr, false, false}; ChainSyncTimeoutState m_chain_sync;
//! Time of last new block announcement //! Time of last new block announcement
int64_t m_last_block_announcement{0}; 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. //! A rolling bloom filter of all announced tx CInvs to this peer.
CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001}; CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001};
CNodeState(bool is_inbound) : CNodeState(bool is_inbound) : m_is_inbound(is_inbound) {}
m_is_inbound(is_inbound)
{
m_recently_announced_invs.reset();
}
}; };
// Keeps track of the time (in microseconds) when transactions were requested last time // Keeps track of the time (in microseconds) when transactions were requested last time