From b9c378007d43ebd3b05d4080c96e7b17d894cf6a Mon Sep 17 00:00:00 2001 From: celbalrai <80897309+celbalrai@users.noreply.github.com> Date: Wed, 21 Apr 2021 16:19:16 +0200 Subject: [PATCH] Staking: set fixed accumulator checkpoint on new blocks --- src/miner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index 891f2ce3ca1352..610f5ef33510d9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -324,6 +324,8 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev); pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, chainparams.GetConsensus()); pblock->nNonce = 0; + if (nHeight < chainparams.GetConsensus().ATPStartHeight) + pblock->nAccumulatorCheckpoint = pindexPrev ? pindexPrev->nAccumulatorCheckpoint : uint256(); pblocktemplate->nPrevBits = pindexPrev->nBits; pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(*pblock->vtx[0]); if (fPos)