jl777 8 years ago
parent
commit
bf238fbc03
  1. 6
      basilisk/basilisk_swap.c
  2. 2
      iguana/iguana_realtime.c
  3. 4
      iguana/iguana_unspents.c

6
basilisk/basilisk_swap.c

@ -53,8 +53,6 @@
Alice timeout event is triggered if INSTANTDEX_LOCKTIME elapses from the start of a FSM instance. Bob timeout event is triggered after INSTANTDEX_LOCKTIME*2
*/
//need vin when creating rawtx
//utxo reuse?
//auto create utxo
#define SCRIPT_OP_IF 0x63
@ -362,8 +360,10 @@ int32_t basilisk_verify_bobdeposit(struct supernet_info *myinfo,void *ptr,uint8_
int32_t basilisk_bobdeposit_refund(struct supernet_info *myinfo,struct basilisk_swap *swap)
{
uint8_t userdata[512]; int32_t len = 0;
printf("basilisk_bobdeposit_refund\n");
len = basilisk_swapuserdata(userdata,1,swap->privBn,0x03,swap->pubB0,0);
int32_t i; for (i=0; i<len; i++)
printf("%02x",userdata[i]);
printf(" <- basilisk_bobdeposit_refund\n");
return(basilisk_rawtx_sign(myinfo,swap->bobcoin->blocks.hwmchain.height,swap,&swap->bobrefund,&swap->bobdeposit,swap->myprivs[0],0,userdata,len));
}

2
iguana/iguana_realtime.c

@ -383,9 +383,7 @@ int32_t iguana_RTramchaindata(struct supernet_info *myinfo,struct iguana_info *c
for (j=0; j<tx->tx_out; j++)
iguana_RTvout_create(coin,polarity,RTptr,block,tx->txid,j,&tx->vouts[j]);
for (j=0; j<tx->tx_in; j++)
{
iguana_RTspend_create(myinfo,coin,RTptr,block,polarity,tx->vins[j].vinscript,tx->vins[j].scriptlen,tx->txid,j,tx->vins[j].prev_hash,tx->vins[j].prev_vout);
}
}
}
else

4
iguana/iguana_unspents.c

@ -1132,7 +1132,7 @@ int32_t iguana_RTunspentslists(struct supernet_info *myinfo,struct iguana_info *
printf("ITEM.(%s) %.8f\n",jprint(item,0),dstr(outpt.value));
unspents++;
numunspents++;
if ( numunspents > max || sum > 10*required )
if ( numunspents >= max )//|| sum > 10*required )
break;
}
}
@ -1607,7 +1607,7 @@ uint64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *co
printf("delete bad utxoaddr files\n");
OS_removefile(fname,0);
OS_removefile(fname2,0);
} else return(iguana_RTstart(myinfo,coin,height));
} else return(coin->histbalance);//iguana_RTstart(myinfo,coin,height));
}
}
free(counts);

Loading…
Cancel
Save