From dd3e21e79d76be99a6abbfbf23f811f4b36de4d4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 16 Dec 2018 06:50:26 -1100 Subject: [PATCH] Test --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e95b01368..4b14ae87c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5054,10 +5054,11 @@ bool AcceptBlock(int32_t *futureblockp,CBlock& block, CValidationState& state, C saplinght = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight; if ( saplinght < 0 ) *futureblockp = 1; + // the problem is when a future sapling block comes in before we detected saplinght if ( saplinght > 0 && (tmpptr= chainActive.LastTip()) != 0 ) { fprintf(stderr,"saplinght.%d tipht.%d blockht.%d cmp.%d\n",saplinght,(int32_t)tmpptr->GetHeight(),pindex->GetHeight(),pindex->GetHeight() < 0 || pindex->GetHeight() >= saplinght || (tmpptr->GetHeight() > saplinght-720 && tmpptr->GetHeight() < saplinht+720)); - if ( pindex->GetHeight() < 0 || pindex->GetHeight() >= saplinght || (tmpptr->GetHeight() > saplinght-720 && tmpptr->GetHeight() < saplinht+720) ) + if ( pindex->GetHeight() < 0 || pindex->GetHeight() >= saplinght || (tmpptr->GetHeight() > saplinght-720 && tmpptr->GetHeight() < saplinght+720) ) *futureblockp = 1; } if ( *futureblockp == 0 )