diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-29 16:15:22 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-29 16:23:58 +0000 |
commit | 157054b8402b8445485c3cdc9ac8ca0237d3b422 (patch) | |
tree | 7fdc97c14671bafc8b9760938d67b3577c846430 /src/cryptonote_basic/hardfork.cpp | |
parent | network_throttle: initialize m_last_sample_time in ctor (diff) | |
download | monero-157054b8402b8445485c3cdc9ac8ca0237d3b422.tar.xz |
hardfork: initialize current_fork_index in ctor
Also order init list to match actual runtime init order
Coverity 136605
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_basic/hardfork.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp index f05b25901..87a394918 100644 --- a/src/cryptonote_basic/hardfork.cpp +++ b/src/cryptonote_basic/hardfork.cpp @@ -56,12 +56,13 @@ static uint8_t get_block_version(const cryptonote::block &b) HardFork::HardFork(cryptonote::BlockchainDB &db, uint8_t original_version, uint64_t original_version_till_height, time_t forked_time, time_t update_time, uint64_t window_size, uint8_t default_threshold_percent): db(db), - original_version(original_version), - original_version_till_height(original_version_till_height), forked_time(forked_time), update_time(update_time), window_size(window_size), - default_threshold_percent(default_threshold_percent) + default_threshold_percent(default_threshold_percent), + original_version(original_version), + original_version_till_height(original_version_till_height), + current_fork_index(0) { if (window_size == 0) throw "window_size needs to be strictly positive"; |