From 0c27d9ab8ce3101dd2635c9253963e2e09967158 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 9 Nov 2016 18:00:10 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 72a6f6ee0..07dc6a3db 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -96,7 +96,7 @@ void dpow_utxosync(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow } } -void dpow_sync(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,int8_t bestk,uint64_t refmask,int32_t myind,bits256 srchash,uint32_t channel,int32_t src_or_dest) +void dpow_sync(struct supernet_info *myinfo,int32_t forceflag,struct dpow_info *dp,struct dpow_block *bp,int8_t bestk,uint64_t refmask,int32_t myind,bits256 srchash,uint32_t channel,int32_t src_or_dest) { int8_t lastk; uint64_t mask; if ( bestk < 0 ) @@ -107,7 +107,7 @@ void dpow_sync(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo mask = refmask; } //dpow_utxosync(myinfo,bp,mask,myind,srchash); - //if ( bp->notaries[myind].masks[lastk] == 0 ) + if ( forceflag || bp->notaries[myind].masks[lastk] == 0 ) dpow_signedtxgen(myinfo,dp,(src_or_dest != 0) ? bp->destcoin : bp->srccoin,bp,lastk,mask,myind,src_or_dest != 0 ? DPOW_SIGBTCCHANNEL : DPOW_SIGCHANNEL,src_or_dest); } @@ -199,7 +199,7 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,uint3 dpow_utxosync(myinfo,dp,bp,0,myind,srchash); bp->recvmask |= (1LL << senderind); } - dpow_sync(myinfo,dp,bp,-1,ep->recvmask,myind,srchash,channel,src_or_dest); + dpow_sync(myinfo,0,dp,bp,-1,ep->recvmask,myind,srchash,channel,src_or_dest); flag = 1; } //printf("bestk.%d %llx vs recv.%llx\n",bp->bestk,(long long)bp->bestmask,(long long)bp->recvmask); @@ -257,7 +257,7 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,uint3 } } //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.lastk,dsig.mask,myind,srchash,channel,src_or_dest); + dpow_sync(myinfo,1,dp,bp,dsig.lastk,dsig.mask,myind,srchash,channel,src_or_dest); flag = 1; } } else printf("%s pubkey mismatch for senderind.%d %llx vs %llx\n",coin->symbol,dsig.senderind,*(long long *)dsig.senderpub,*(long long *)bp->notaries[dsig.senderind].pubkey);