Browse Source

might work

blackjok3r
blackjok3r 6 years ago
parent
commit
b6e8a26caf
  1. 19
      iguana/dpow/dpow_fsm.c

19
iguana/dpow/dpow_fsm.c

@ -623,20 +623,21 @@ void dpow_statemachinestart(void *ptr)
// unlock the dest utxo on KMD.
if ( (strcmp("KMD",dest->symbol) == 0 ) && (ep->dest.prev_vout != -1) )
{
destunlockunspent = dpow_unlockunspent(myinfo,bp->destcoin,destaddr,bits256_str(str2,ep->dest.prev_hash),ep->dest.prev_vout);
printf("destlockunspent: %s\n", destunlockunspent);
if (strcmp(destunlockunspent,"true") == 0 )
printf(">>>>UNLOCKED %s UTXO.(%s) vout.(%d)\n",dest->symbol,bits256_str(str2,ep->dest.prev_hash),ep->dest.prev_vout);
free(destunlockunspent);
if ( destunlockunspent = dpow_unlockunspent(myinfo,bp->destcoin,destaddr,bits256_str(str2,ep->dest.prev_hash),ep->dest.prev_vout) != 0 ) {
if (strcmp(destunlockunspent,"true") == 0 )
printf(">>>>UNLOCKED %s UTXO.(%s) vout.(%d)\n",dest->symbol,bits256_str(str2,ep->dest.prev_hash),ep->dest.prev_vout);
free(destunlockunspent);
}
}
// unlock the src selected utxo on KMD, as those are the only ones we LOCK, and CHIPS does not like the lockunspent call.
if ( ( strcmp("KMD",src->symbol) == 0 ) && (ep->src.prev_vout != -1) )
{
srcunlockunspent = dpow_unlockunspent(myinfo,bp->srccoin,srcaddr,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout);
if (strcmp(srcunlockunspent,"true") == 0 )
printf(">>>>UNLOCKED %s UTXO.(%s) vout.(%d)\n",src->symbol,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout);
free(srcunlockunspent);
if ( srcunlockunspent = dpow_unlockunspent(myinfo,bp->srccoin,srcaddr,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout) != 0) {
if (strcmp(srcunlockunspent,"true") == 0 )
printf(">>>>UNLOCKED %s UTXO.(%s) vout.(%d)\n",src->symbol,bits256_str(str2,ep->src.prev_hash),ep->src.prev_vout);
free(srcunlockunspent);
}
}
// dp->blocks[bp->height] = 0;

Loading…
Cancel
Save