jl777 8 years ago
parent
commit
10610d345c
  1. 6
      iguana/dpow/dpow_fsm.c
  2. 1
      iguana/dpow/dpow_tx.c

6
iguana/dpow/dpow_fsm.c

@ -151,7 +151,7 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t
{
if ( dsig.lastk < bp->numnotaries && dsig.senderind < bp->numnotaries && (ep= dpow_notaryfind(myinfo,bp,&senderind,dsig.senderpub)) != 0 )
{
cp = (src_or_dest != 0) ? &bp->notaries[myind].dest : &bp->notaries[myind].src;
cp = (src_or_dest != 0) ? &bp->notaries[dsig.senderind].dest : &bp->notaries[dsig.senderind].src;
vcalc_sha256(0,commit.bytes,dsig.beacon.bytes,sizeof(dsig.beacon));
if ( memcmp(dsig.senderpub,bp->notaries[dsig.senderind].pubkey,33) == 0 )
{
@ -165,13 +165,15 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t
{
bp->destsigsmasks[dsig.lastk] |= (1LL << dsig.senderind);
if ( bp->bestk >= 0 && bp->bestk == dsig.lastk && (bp->bestmask & bp->destsigsmasks[dsig.lastk]) == bp->bestmask )
{
dpow_sigscheck(myinfo,bp,channel,myind,src_or_dest);
}
}
else
{
bp->srcsigsmasks[dsig.lastk] |= (1LL << dsig.senderind);
}
printf(" <<<<<<<< %s from.%d got lastk.%d %llx/%llx siglen.%d >>>>>>>>>\n",coin->symbol,dsig.senderind,dsig.lastk,(long long)dsig.mask,(long long)bp->destsigsmasks[dsig.lastk],dsig.siglen);
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);
dpow_sync(myinfo,bp,dsig.mask,myind,srchash,channel,src_or_dest);
flag = 1;
}

1
iguana/dpow/dpow_tx.c

@ -260,6 +260,7 @@ void dpow_sigscheck(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t
bits256 txid,srchash,zero; struct iguana_info *coin; int32_t j,len,numsigs; char *retstr=0,str[65],str2[65]; uint8_t txdata[32768];
coin = (src_or_dest != 0) ? bp->destcoin : bp->srccoin;
memset(zero.bytes,0,sizeof(zero));
printf("sigscheck myind.%d src_dest.%d state.%x\n",myind,src_or_dest,bp->state);
if ( bp->state != 0xffffffff && coin != 0 )
{
bp->signedtxid = dpow_notarytx(bp->signedtx,&numsigs,coin->chain->isPoS,bp,bp->bestk,bp->bestmask,bp->opret_symbol,1,src_or_dest);

Loading…
Cancel
Save