From 5161c86d56b096806b76d8fd657e0db7faf14c36 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 25 Sep 2018 10:16:05 +0800 Subject: [PATCH] that didnt work, try another way --- src/komodo.h | 5 ++++- src/komodo_notary.h | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index d8376d15c..3c708989f 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -831,6 +831,9 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) txn_count = block.vtx.size(); for (i=0; iGetBlockTime()) != 0)) + printf("ERA 0 SKIP %s\n",ASSETCHAINS_SYMBOL); + continue; txhash = block.vtx[i].GetHash(); numvouts = block.vtx[i].vout.size(); notaryid = -1; @@ -857,7 +860,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) numvalid = bitweight(signedmask); if ( (((height < 90000 || (signedmask & 1) != 0) && numvalid >= KOMODO_MINRATIFY) || (numvalid >= KOMODO_MINRATIFY && ASSETCHAINS_SYMBOL[0] != 0) || - numvalid > (numnotaries/5)) ) + numvalid > (numnotaries/5))) { if ( ASSETCHAINS_SYMBOL[0] != 0) { diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 352316e77..de343e184 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -305,12 +305,12 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam return(ns4); } else if (staked_era == 0) { - // this means we are in a gap, so we set the array of pubkeys to zero, so all notarizations are invalid. + // this means we are in a gap, so we set the array of pubkeys to zero, this does't seem to correctly work, so added exeption to komodo.h aswell. for (i=0; i<1; i++) decode_hex(null_pubkeys[i],33,(char *)notaries_STAKED1[i][1]); - printf("%s IS A STAKED CHAIN and is in an ERA GAP, so we ignored it.\n",ASSETCHAINS_SYMBOL); + printf("%s IS A STAKED CHAIN and is in an ERA GAP, so we zeroed the pubkeys.\n",ASSETCHAINS_SYMBOL); memcpy(pubkeys,null_pubkeys,64 * 33); - return(2); + return(64); } } }