From d8ce705a715d0fcfada5cf0626850925f1869944 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 19 Oct 2016 18:30:18 -0300 Subject: [PATCH] test --- src/komodo.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 1a831f799..aa4a6e5b3 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -376,10 +376,11 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen, printf("ht.%d NOTARIZED.%d KMD.%s BTC.%s\n",height,*notarizedheightp,kmdtxid.ToString().c_str(),btctxid.ToString().c_str()); if ( *notarizedheightp > NOTARIZED_HEIGHT ) { + static uint256 zero; NOTARIZED_HEIGHT = *notarizedheightp; NOTARIZED_HASH = kmdtxid; NOTARIZED_BTCHASH = btctxid; - komodo_stateupdate(0,0,0,0,0,0); + komodo_stateupdate(0,0,0,zero,0,0); } } } @@ -394,7 +395,8 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) int32_t i,j,k,numvalid,specialtx,notarizedheight,notaryid,len,numvouts,numvins,height,txn_count,flag; if ( didinit == 0 ) { - komodo_stateupdate(0,0,0,0,0,0); + memset(&txhash,0,sizeof(txhash)); + komodo_stateupdate(0,0,0,txhash,0,0); didinit = 1; } // update voting results and official (height, notaries[]) @@ -457,7 +459,10 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) } } if ( numvalid > 13 ) - komodo_stateupdate(pubkeys,numvalid,0,0,0,0); + { + memset(&txhash,0,sizeof(txhash)); + komodo_stateupdate(pubkeys,numvalid,0,txhash,0,0); + } printf("new notaries.%d newheight.%d from height.%d\n",numvouts-1,(((height+500)/1000)+1)*1000,height); } }