From dd7b22adda2bbaa47a42098819f699e1dc3e546d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 19 Oct 2016 17:41:42 -0300 Subject: [PATCH] test --- src/komodo.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/komodo.h b/src/komodo.h index 473c94ebd..5090976e8 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -203,8 +203,11 @@ int32_t komodo_stateupdate(uint8_t notarypubs[][33],uint8_t numnotaries) if ( func == 'P' ) { if ( (num= fgetc(fp)) < 64 ) + { if ( fread(pubkeys,33,num,fp) != num ) errs++; + else printf("updated %d pubkeys\n",num); + } else printf("illegal num.%d\n",num); } else if ( func == 'N' ) @@ -360,7 +363,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) { static int32_t didinit; char *scriptstr,*opreturnstr; uint64_t signedmask,voutmask; - uint8_t scriptbuf[4096]; uint256 kmdtxid,btctxid,txhash; + uint8_t scriptbuf[4096],pubkeys[64][33]; uint256 kmdtxid,btctxid,txhash; int32_t i,j,k,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count,flag; if ( didinit == 0 ) { @@ -409,6 +412,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) printf("NOTARY SIGNED.%llx numvins.%d ht.%d txi.%d notaryht.%d specialtx.%d\n",(long long)signedmask,numvins,height,i,notarizedheight,specialtx); if ( specialtx != 0 && numvouts > 2 && komodo_threshold(signedmask) > 0 ) { + memset(pubkeys,0,sizeof(pubkeys)); for (j=1; j