From 4fbbc80b2c5dc664a3d2a6bd4a2c48ad13d38e29 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 4 Nov 2016 13:06:08 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 4 ++-- iguana/dpow/dpow_tx.c | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 6ec0ec9e9..23c8c38ba 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -248,7 +248,7 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,uint3 dpow_sigscheck(myinfo,dp,bp,DPOW_SIGCHANNEL,myind,0); } } - printf(" (%d %llx) <<<<<<<< %s from.%d got lastk.%d %llx/%llx siglen.%d >>>>>>>>>\n",bp->bestk,(long long)bp->bestmask,coin->symbol,dsig.senderind,dsig.lastk,(long long)dsig.mask,(long long)bp->destsigsmasks[dsig.lastk],dsig.siglen); + printf(" ht.%d (%d %llx) <<<<<<<< %s from.%d got lastk.%d %llx/%llx siglen.%d >>>>>>>>>\n",bp->height,bp->bestk,(long long)bp->bestmask,coin->symbol,dsig.senderind,dsig.lastk,(long long)dsig.mask,(long long)bp->destsigsmasks[dsig.lastk],dsig.siglen); dpow_sync(myinfo,dp,bp,dsig.mask,myind,srchash,channel,src_or_dest); flag = 1; } @@ -360,7 +360,7 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo dpow_sendcoinentrys(myinfo,dp,bp); bp->bestmask = dpow_maskmin(bp->recvmask,bp,&bp->bestk); dpow_signedtxgen(myinfo,dp,(bp->state < 1000) ? bp->destcoin : bp->srccoin,bp,bp->bestk,bp->bestmask,myind,bp->state < 1000 ? DPOW_SIGBTCCHANNEL : DPOW_SIGCHANNEL,bp->state < 1000); - //printf("ht.%d numnotaries.%d BEST.%llx from RECV.%llx bestk.%d\n",bp->height,bp->numnotaries,(long long)bp->bestmask,(long long)bp->recvmask,bp->bestk); + printf("ht.%d numnotaries.%d BEST.%llx from RECV.%llx bestk.%d\n",bp->height,bp->numnotaries,(long long)bp->bestmask,(long long)bp->recvmask,bp->bestk); } } if ( bp->state < 1000 && bp->bestk >= 0 && (bp->destsigsmasks[bp->bestk] & bp->bestmask) == bp->bestmask ) diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index d4a973bab..01103af82 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -292,10 +292,7 @@ void dpow_rawtxsign(struct supernet_info *myinfo,struct dpow_info *dp,struct igu int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct dpow_info *dp,struct iguana_info *coin,struct dpow_block *bp,int8_t bestk,uint64_t bestmask,int32_t myind,uint32_t sigchannel,int32_t src_or_dest) { - int32_t j,incr,numsigs,retval=-1; char rawtx[32768]; cJSON *vins; bits256 txid,srchash,zero; struct dpow_entry *ep; - if ( bp->numnotaries < 8 ) - incr = 1; - else incr = sqrt(bp->numnotaries) + 1; + int32_t j,numsigs,retval=-1; char rawtx[32768]; cJSON *vins; bits256 txid,srchash,zero; struct dpow_entry *ep; bestmask = dpow_maskmin(bestmask,bp,&bestk); ep = &bp->notaries[myind]; memset(&zero,0,sizeof(zero));