From a710762818470e2fcaf865de4459ba3362c75888 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Mar 2017 00:51:12 +0200 Subject: [PATCH] Test --- src/init.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index b9881cf1e..ad7559fcd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1247,7 +1247,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) MIN_BLOCKS_TO_KEEP, GetArg("-checkblocks", 288)); } uint256 hash(uint256S("0000005213c9cea80d42aae6e917487485d0b197a83ffbc0bcd0aef6e38c6ded")); - //uint256 hash2(uint256S("05a8cd56e2118713ed5931300868fbcd96f573c5051b3568f053658b2a5a1115")); + uint256 hash2(uint256S("05a8cd56e2118713ed5931300868fbcd96f573c5051b3568f053658b2a5a1115")); CValidationState state; { LOCK(cs_main); @@ -1257,6 +1257,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if ( (pblockindex= mapBlockIndex[hash]) != 0 ) InvalidateBlock(state, pblockindex); } + if ( mapBlockIndex.count(hash2) != 0 ) + { + CBlockIndex* pblockindex; + if ( (pblockindex= mapBlockIndex[hash2]) != 0 ) + InvalidateBlock(state, pblockindex); + } } if ( KOMODO_REWIND >= 0 )