From 442aaba714c3600c55e7d30fd2609898abef1339 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 9 Oct 2016 16:54:25 -0300 Subject: [PATCH] test --- iguana/iguana_notary.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 63e17c52c..8a4ef47e1 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -837,24 +837,20 @@ uint32_t dpow_statemachineiterate(struct supernet_info *myinfo,struct dpow_info dpow_txidupdate(myinfo,dp,coin,recvmaskp,channel,heightmsg,notaries,numnotaries,myind,hashmsg); k = 0; printf("STATE3: %s BTC.%d RECVMASK.%llx\n",coin->symbol,bits256_nonz(btctxid),(long long)*recvmaskp); - if ( bitweight(*recvmaskp) > numnotaries/2+1 ) + mask = 0; + for (j=m=nonz=0; j= numnotaries/2+1 ) - break; - } + if ( bits256_nonz(notaries[k].prev_hash) != 0 ) + nonz++; + mask |= (1LL << k); + if ( ++m >= numnotaries/2+1 ) + break; } - } else mask = *recvmaskp; - if ( bitweight(mask) == numnotaries/2+1 && k == numnotaries/2+1 ) + } + if ( bitweight(mask) == numnotaries/2+1 && m == numnotaries/2+1 ) { if ( dpow_signedtxgen(myinfo,dp,coin,signedtxidp,signedtx,mask,k,notaries,numnotaries,heightmsg,myind,hashmsg,btctxid,timestamp) == 0 ) {