From bd6949b98718fb0228809efc52d372bff18bbd7a Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 4 Feb 2019 11:51:02 +0800 Subject: [PATCH] disable notarisation priority for non staked chains. --- src/miner.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index da5fcd91f..5f1afa874 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -246,9 +246,12 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32 pblock->nTime = GetAdjustedTime(); // Now we have the block time, we can get the active notaries. int32_t staked_era; int8_t numSN; - uint8_t staked_pubkeys[64][33]; - staked_era = STAKED_era(pblock->nTime); - numSN = numStakedNotaries(staked_pubkeys,staked_era); + uint8_t staked_pubkeys[64][33] = {0}; + if ( is_STAKED(ASSETCHAINS_SYMBOL) != 0 ) + { + staked_era = STAKED_era(pblock->nTime); + numSN = numStakedNotaries(staked_pubkeys,staked_era); + } CCoinsViewCache view(pcoinsTip); uint32_t expired; uint64_t commission;