Skip to content

Commit 6927933

Browse files
committed
[net processing] Add ChainSyncTimeoutState default initializers
Moves the default values closer to the member definitions.
1 parent 55966e0 commit 6927933

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/net_processing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,16 +575,16 @@ struct CNodeState {
575575
*/
576576
struct ChainSyncTimeoutState {
577577
//! A timeout used for checking whether our peer has sufficiently synced
578-
int64_t m_timeout;
578+
int64_t m_timeout{0};
579579
//! A header with the work we require on our peer's chain
580-
const CBlockIndex * m_work_header;
580+
const CBlockIndex* m_work_header{nullptr};
581581
//! After timeout is reached, set to true after sending getheaders
582-
bool m_sent_getheaders;
582+
bool m_sent_getheaders{false};
583583
//! Whether this peer is protected from disconnection due to a bad/slow chain
584-
bool m_protect;
584+
bool m_protect{false};
585585
};
586586

587-
ChainSyncTimeoutState m_chain_sync{0, nullptr, false, false};
587+
ChainSyncTimeoutState m_chain_sync;
588588

589589
//! Time of last new block announcement
590590
int64_t m_last_block_announcement{0};

0 commit comments

Comments
 (0)