jl777 8 years ago
parent
commit
47f9c4ee72
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 7
      iguana/dpow/dpow_network.c
  3. 5
      iguana/dpow/dpow_tx.c

4
iguana/dpow/dpow_fsm.c

@ -391,11 +391,11 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo
}
if ( bp->state < 1000 && bp->bestk >= 0 && (bp->destsigsmasks[bp->bestk] & bp->bestmask) == bp->bestmask )
{
dpow_sigscheck(myinfo,dp,bp,DPOW_SIGBTCCHANNEL,myind,1);
dpow_sigscheck(myinfo,dp,bp,myind,1);
}
else if ( bp->state != 0xffffffff && bp->bestk >= 0 && (bp->srcsigsmasks[bp->bestk] & bp->bestmask) == bp->bestmask )
{
dpow_sigscheck(myinfo,dp,bp,DPOW_SIGCHANNEL,myind,0);
dpow_sigscheck(myinfo,dp,bp,myind,0);
}
return(bp->state);
}

7
iguana/dpow/dpow_network.c

@ -276,7 +276,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru
matches++;
if ( ((1LL << i) & bp->bestmask) != 0 )
bestmatches++;
} else printf("mismatch.%d (%d %llx) ",i,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask);
} // else printf("mismatch.%d (%d %llx) ",i,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask);
}
if ( bestmatches >= bp->minsigs )
{
@ -290,11 +290,14 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru
{
if ( bp->state < 1000 )
{
dpow_signedtxgen(myinfo,dp,bp->srccoin,bp,bp->bestk,bp->bestmask,bp->myind,DPOW_SIGCHANNEL,0,0);
dpow_sigscheck(myinfo,dp,bp,bp->myind,1);
bp->state = 1000;
}
if ( bp->srcsigsmasks[bp->bestk] == bp->bestmask ) // have all sigs
{
dpow_sigscheck(myinfo,dp,bp,bp->myind,0);
bp->state = 0xffffffff;
}
}
}
}

5
iguana/dpow/dpow_tx.c

@ -459,11 +459,12 @@ int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct dpow_info *dp,struc
return(retval);
}
void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint32_t channel,int32_t myind,int32_t src_or_dest)
void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,int32_t myind,int32_t src_or_dest)
{
bits256 txid,srchash,zero,signedtxid; struct iguana_info *coin; int32_t j,len,numsigs; char *retstr=0,str[65],str2[65]; uint8_t txdata[32768];
bits256 txid,srchash,zero,signedtxid; struct iguana_info *coin; int32_t j,len,numsigs; char *retstr=0,str[65],str2[65]; uint8_t txdata[32768]; uint32_t channel;
coin = (src_or_dest != 0) ? bp->destcoin : bp->srccoin;
memset(zero.bytes,0,sizeof(zero));
channel = (src_or_dest != 0) ? DPOW_SIGBTCCHANNEL : DPOW_SIGCHANNEL;
//printf("sigscheck myind.%d src_dest.%d state.%x\n",myind,src_or_dest,bp->state);
if ( bp->state != 0xffffffff && coin != 0 )
{

Loading…
Cancel
Save