Skip to content

Commit

Permalink
(partial) Merge bitcoin#21424: Net processing: Tidy up CNodeState ctor
Browse files Browse the repository at this point in the history
6927933 [net processing] Add ChainSyncTimeoutState default initializers (John Newbery)
55966e0 [net processing] Remove CNodeState ctor body (John Newbery)

Pull request description:

  This addresses the two outstanding review comments from bitcoin#21370.

ACKs for top commit:
  practicalswift:
    cr ACK 6927933: patch looks correct
  hebasto:
    ACK 6927933, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: b3ef5c8a096e447887df255406b3a760f01c73e2b942374595416b4b4031fc69b89cd93168c45040489d581f340b2a62d3fbabd207d4307f587c00a7a7daacd1
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Jul 25, 2023
1 parent 5e20e69 commit aec81cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,13 @@ struct CNodeState {
*/
struct ChainSyncTimeoutState {
//! A timeout used for checking whether our peer has sufficiently synced
int64_t m_timeout;
int64_t m_timeout{0};
//! A header with the work we require on our peer's chain
const CBlockIndex * m_work_header;
const CBlockIndex* m_work_header{nullptr};
//! After timeout is reached, set to true after sending getheaders
bool m_sent_getheaders;
bool m_sent_getheaders{false};
//! Whether this peer is protected from disconnection due to a bad/slow chain
bool m_protect;
bool m_protect{false};
};

ChainSyncTimeoutState m_chain_sync;
Expand Down

0 comments on commit aec81cd

Please sign in to comment.