aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-03-12 11:39:22 +0000
committerJohn Newbery <john@johnnewbery.com>2021-03-12 11:39:22 +0000
commit6927933782acb9b158787e6f35debb916793f6b1 (patch)
treefe56bb2a74430b8d83b9f8340aec31eb424d2cc8 /src
parent55966e0cc03f0e380d21a9434b048d4d515b6729 (diff)
[net processing] Add ChainSyncTimeoutState default initializers
Moves the default values closer to the member definitions.
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 46fdc81a4a..6ce984348c 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -575,16 +575,16 @@ 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{0, nullptr, false, false};
+ ChainSyncTimeoutState m_chain_sync;
//! Time of last new block announcement
int64_t m_last_block_announcement{0};