From 7589f03a03ad2051791c076c2b13202e9fc3ba34 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 14 Nov 2016 12:27:42 -0300 Subject: [PATCH] test --- src/komodo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 9152fe180..0b8259890 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -378,8 +378,9 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) static int32_t hwmheight; uint64_t signedmask,voutmask; uint8_t scriptbuf[4096],pubkeys[64][33]; uint256 kmdtxid,btctxid,txhash; - int32_t i,j,k,isratification,nid,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count; + int32_t i,j,k,numnotaries,isratification,nid,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count; komodo_init(pindex->nHeight); + numnotaries = komodo_notaries(pubkeys,pindex->nHeight); if ( pindex->nHeight > hwmheight ) hwmheight = pindex->nHeight; else @@ -484,7 +485,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) } } } - if ( ((signedmask & 1) != 0 && numvalid >= KOMODO_MINRATIFY) || bitweight(signedmask) > (bp->numnotaries>>1) ) + if ( ((signedmask & 1) != 0 && numvalid >= KOMODO_MINRATIFY) || bitweight(signedmask) > (numnotaries>>1) ) { memset(&txhash,0,sizeof(txhash)); komodo_stateupdate(height,pubkeys,numvalid,0,txhash,0,0,0,0,0,0,0,0,0);