jl777 8 years ago
parent
commit
c5e8f05690
  1. 5
      iguana/iguana_notary.c

5
iguana/iguana_notary.c

@ -672,18 +672,21 @@ uint32_t dpow_statemachineiterate(struct supernet_info *myinfo,struct dpow_info
{
printf("signtxgen\n");
if ( dpow_signedtxgen(myinfo,dp,coin,signedtxidp,signedtx,mask,k,notaries,numnotaries,heightmsg,myind,hashmsg,btctxid) == 0 )
{
dp->destupdated = 0;
state = 4;
}
} else printf("mask.%llx wt.%d\n",(long long)mask,bitweight(mask));
break;
case 4: // wait for N/2+1 signed tx and broadcast
dpow_txidupdate(myinfo,dp,coin,recvmaskp,channel,heightmsg,notaries,numnotaries,myind,hashmsg);
printf("STATE4\n");
if ( (m= dpow_mostsignedtx(myinfo,dp,coin,signedtxidp,signedtx,&mask,&k,notaries,numnotaries,heightmsg,myind,hashmsg,btctxid)) > 0 )
{
if ( m >= numnotaries/2+1 )
{
if ( (retstr= dpow_sendrawtransaction(myinfo,coin,signedtx)) != 0 )
{
dp->destupdated = 0;
printf("sendrawtransaction.(%s)\n",retstr);
free(retstr);
}

Loading…
Cancel
Save