aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/hardfork.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-23 21:12:55 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-23 21:12:55 +0000
commit3b47ca2d7ded0e886d7fb299ebd421f3afd373c9 (patch)
tree355824c847cc5543e35a881e52785d94bf5e3349 /src/cryptonote_core/hardfork.cpp
parentAdd IP blocking for misbehaving nodes (adapted from Boolberry) (diff)
downloadmonero-3b47ca2d7ded0e886d7fb299ebd421f3afd373c9.tar.xz
hardfork: fix rescan on load
Diffstat (limited to 'src/cryptonote_core/hardfork.cpp')
-rw-r--r--src/cryptonote_core/hardfork.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_core/hardfork.cpp
index 836378050..3d1bca32d 100644
--- a/src/cryptonote_core/hardfork.cpp
+++ b/src/cryptonote_core/hardfork.cpp
@@ -263,7 +263,7 @@ bool HardFork::rescan_from_block_height(uint64_t height)
versions.push_back(v);
}
- uint8_t lastv = db.get_hard_fork_version(height);
+ uint8_t lastv = db.get_hard_fork_version(db.height() - 1);
current_fork_index = 0;
while (current_fork_index + 1 < heights.size() && heights[current_fork_index].version != lastv)
++current_fork_index;