jl777 8 years ago
parent
commit
cffc22f608
  1. 7
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_tx.c

7
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; i<bp->numnotaries; 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 )
{

2
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 )

Loading…
Cancel
Save