hardfork: fix rescan on load

This commit is contained in:
moneromooo-monero 2015-11-23 21:12:55 +00:00
parent 4cea2b13b2
commit 3b47ca2d7d
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -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;