From 2cf2e5f83ed27dcf45b1b98d57683819b7b93f49 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 25 Sep 2018 01:17:49 +0800 Subject: [PATCH] try to zero array of pubkeys --- src/komodo.h | 2 +- src/komodo_notary.h | 18 +++++++++--------- src/notarisationdb.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index ead20f034..d8376d15c 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -859,7 +859,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) (numvalid >= KOMODO_MINRATIFY && ASSETCHAINS_SYMBOL[0] != 0) || numvalid > (numnotaries/5)) ) { - if ( ASSETCHAINS_SYMBOL[0] != 0 && numvins >= 2) // check numvins, because on STAKED during ERA GAP, it counts every TX as notarized.u + if ( ASSETCHAINS_SYMBOL[0] != 0) { static FILE *signedfp; if ( signedfp == 0 ) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index 3dc0c05f3..352316e77 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -208,7 +208,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam static uint8_t elected_pubkeys0[64][33],elected_pubkeys1[64][33],did0,did1; static int32_t n0,n1; static uint8_t staked_pubkeys1[64][33],staked_pubkeys2[64][33],didstaked1,didstaked2; static int32_t ns1,ns2; static uint8_t staked_pubkeys3[64][33],staked_pubkeys4[64][33],didstaked3,didstaked4; static int32_t ns3,ns4; - static uint8_t null_pubkeys[64][33]; + static uint8_t null_pubkeys[64][33] = {0}; int staked_era; int32_t i,htind,n; uint64_t mask = 0; struct knotary_entry *kp,*tmp; if ( timestamp == 0 && ASSETCHAINS_SYMBOL[0] != 0 ) @@ -263,7 +263,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam for (i=0; i