jl777 8 years ago
parent
commit
c629376f43
  1. 12
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_network.c
  3. 4
      iguana/dpow/dpow_tx.c

12
iguana/dpow/dpow_fsm.c

@ -74,7 +74,7 @@ void dpow_utxosync(struct supernet_info *myinfo,struct dpow_block *bp,uint64_t r
if ( ((1LL << myind) & recvmask) == 0 )
{
i = myind;
//printf("utxosync bp->%llx != %llx, myind.%d\n",(long long)bp->recvmask,(long long)recvmask,myind);
printf("utxosync bp->%llx != %llx, myind.%d\n",(long long)bp->recvmask,(long long)recvmask,myind);
}
else
{
@ -85,7 +85,7 @@ void dpow_utxosync(struct supernet_info *myinfo,struct dpow_block *bp,uint64_t r
if ( ((1LL << i) & bp->recvmask) != 0 && ((1LL << i) & recvmask) == 0 )
break;
}
//printf("utxosync bp->%llx != %llx, random pick.%d\n",(long long)bp->recvmask,(long long)recvmask,i);
printf("utxosync bp->%llx != %llx, random pick.%d\n",(long long)bp->recvmask,(long long)recvmask,i);
}
memset(&U,0,sizeof(U));
dpow_entry2utxo(&U,bp,&bp->notaries[i]);
@ -217,13 +217,13 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t
sendutxo = 0;
for (i=0; i<bp->numnotaries; i++)
{
k = ((bp->height % bp->numnotaries) + i) % bp->numnotaries;
if ( k == myind )
continue;
k = ((bp->height % bp->numnotaries) + i) % bp->numnotaries;
if ( ((1LL << k) & bp->recvmask) != 0 && (bp->notaries[k].recvmask & (1LL << myind)) == 0 )
{
printf("other notary.%d doesnt have our.%d utxo yet\n",k,myind);
sendutxo = 1;
//printf("other notary.%d doesnt have our.%d utxo yet\n",k,myind);
//sendutxo = 1;
break;
}
}
@ -231,7 +231,7 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_block *bp,uint32_t
dpow_signedtxgen(myinfo,(src_or_dest != 0) ? bp->destcoin : bp->srccoin,bp,bp->bestk,bp->bestmask,myind,bp->opret_symbol,sigchannel,src_or_dest);
//else dpow_sigsend(myinfo,bp,myind,bp->bestk,bp->bestmask,srchash,sigchannel);
}
if ( 0 && sendutxo != 0 )
if ( sendutxo != 0 )
{
memset(&U,0,sizeof(U));
dpow_entry2utxo(&U,bp,&bp->notaries[myind]);

2
iguana/dpow/dpow_network.c

@ -268,7 +268,7 @@ void dpow_sigsend(struct supernet_info *myinfo,struct dpow_block *bp,int32_t myi
{
struct dpow_sigentry dsig; int32_t i,len; uint8_t data[4096]; struct dpow_entry *ep;
ep = &bp->notaries[myind];
//printf("myind.%d bestk.%d %llx >>>>>> broadcast sig\n",myind,bestk,(long long)bestmask);
printf("sigsend: myind.%d bestk.%d %llx >>>>>> broadcast\n",myind,bestk,(long long)bestmask);
memset(&dsig,0,sizeof(dsig));
for (i=0; i<33; i++)
dsig.senderpub[i] = myinfo->DPOW.minerkey33[i];

4
iguana/dpow/dpow_tx.c

@ -246,9 +246,9 @@ int32_t dpow_signedtxgen(struct supernet_info *myinfo,struct iguana_info *coin,s
txdata[j] = tmp.bytes[j];
dpow_send(myinfo,bp,zero,bp->hashmsg,(bits256_nonz(bp->btctxid) == 0) ? DPOW_BTCTXIDCHANNEL : DPOW_TXIDCHANNEL,bp->height,txdata,len+32,bp->txidcrcs);*/
dpow_rawtxsign(myinfo,coin,bp,rawtx,vins,bestk,bestmask,myind,sigchannel,src_or_dest);
}
} else printf("signedtxgen zero txid or null rawtx\n");
free_json(vins);
}
} else printf("signedtxgen error generating vins\n");
return(retval);
}

Loading…
Cancel
Save