Skip to content

Commit aec81cd

Browse files
MarcoFalkePastaPastaPasta
MarcoFalke
authored andcommitted
(partial) Merge bitcoin#21424: Net processing: Tidy up CNodeState ctor
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
1 parent 5e20e69 commit aec81cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/net_processing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,13 @@ struct CNodeState {
589589
*/
590590
struct ChainSyncTimeoutState {
591591
//! A timeout used for checking whether our peer has sufficiently synced
592-
int64_t m_timeout;
592+
int64_t m_timeout{0};
593593
//! A header with the work we require on our peer's chain
594-
const CBlockIndex * m_work_header;
594+
const CBlockIndex* m_work_header{nullptr};
595595
//! After timeout is reached, set to true after sending getheaders
596-
bool m_sent_getheaders;
596+
bool m_sent_getheaders{false};
597597
//! Whether this peer is protected from disconnection due to a bad/slow chain
598-
bool m_protect;
598+
bool m_protect{false};
599599
};
600600

601601
ChainSyncTimeoutState m_chain_sync;

0 commit comments

Comments
 (0)