From cffc22f608d11566ae15b03782e5d6785e824165 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 9 Nov 2016 17:06:41 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 7 ++++++- iguana/dpow/dpow_tx.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 5b68f3240..5384c44e8 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -101,7 +101,7 @@ void dpow_sync(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo int8_t lastk; uint64_t mask; mask = dpow_maskmin(refmask,bp,&lastk); //dpow_utxosync(myinfo,bp,mask,myind,srchash); - if ( bp->notaries[myind].masks[lastk] == 0 ) + //if ( 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); } @@ -337,7 +337,12 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo if ( bp->bestk >= 0 && ep->masks[src_or_dest][bp->bestk] == 0 ) dpow_signedtxgen(myinfo,dp,(src_or_dest != 0) ? bp->destcoin : bp->srccoin,bp,bp->bestk,bp->bestmask,myind,DPOW_SIGBTCCHANNEL,src_or_dest); if ( bp->bestk >= 0 && (rand() % 10) == 0 ) + { dpow_sigsend(myinfo,dp,bp,myind,bp->bestk,bp->bestmask,srchash,DPOW_SIGBTCCHANNEL); + for (i=0; inumnotaries; i++) + if ( bp->notaries[i].bestk >= 0 && bp->notaries[i].bestk != bp->bestk ) + dpow_sigsend(myinfo,dp,bp,myind,bp->notaries[i].bestk,bp->bestmask,srchash,DPOW_SIGBTCCHANNEL); + } } else if ( bp->state != 0xffffffff ) { diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 7dc7aa4a1..28fafba98 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -310,7 +310,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,numsigs,retval=-1; char rawtx[32768]; cJSON *vins; bits256 txid,srchash,zero; struct dpow_entry *ep; - bestmask = dpow_maskmin(bestmask,bp,&bestk); + //bestmask = dpow_maskmin(bestmask,bp,&bestk); ep = &bp->notaries[myind]; memset(&zero,0,sizeof(zero)); if ( bestk < 0 )