From d837c0ca906ed94e423eba10cc4dc7b3185cb842 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 25 Dec 2015 22:02:07 +0000 Subject: blockchain: fix switch to alternative blockchain for more than one block When rolling over more than one block, the db height will decrease, but the split height should be constant, as per the original code. --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index f3111a966..128dd9e48 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -797,7 +797,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::listheight()); + rollback_blockchain_switching(disconnected_chain, split_height); // FIXME: Why do we keep invalid blocks around? Possibly in case we hear // about them again so we can immediately dismiss them, but needs some -- cgit v1.2.3