Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d37d74ee9f
  1. 2
      basilisk/basilisk_bitcoin.c
  2. 4
      iguana/swaps/iguana_BTCswap.c

2
basilisk/basilisk_bitcoin.c

@ -538,7 +538,7 @@ double basilisk_bitcoin_rawtxmetric(struct supernet_info *myinfo,struct basilisk
addresses = jarray(&numaddrs,ptr->vals,"addresses");
if ( (txobj= bitcoin_hex2json(coin,&txid,&msgtx,rawtx,extraspace,sizeof(extraspace),serialized)) != 0 )
{
printf("GOT VINS.(%s) rawtx.(%s) out0 %.8f\n",jprint(vins,0),rawtx,dstr(msgtx.vouts[0].value));
//printf("GOT VINS.(%s) rawtx.(%s) out0 %.8f\n",jprint(vins,0),rawtx,dstr(msgtx.vouts[0].value));
if ( juint(txobj,"locktime") != locktime )
{
printf("locktime mismatch %u != %u\n",juint(txobj,"locktime"),locktime);

4
iguana/swaps/iguana_BTCswap.c

@ -203,11 +203,11 @@ struct bitcoin_statetx *instantdex_signtx(char *str,struct supernet_info *myinfo
jaddnum(valsobj,"timeout",30000);
if ( (retstr= basilisk_rawtx(myinfo,coin,0,0,basilisktag,valsobj,coin->symbol)) != 0 )
{
printf("%s got.(%s)\n",str,retstr);
//printf("%s got.(%s)\n",str,retstr);
flag = 0;
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
if ( (rawtx= jstr(retjson,"result")) != 0 && (vins= jobj(retjson,"vins")) != 0 )
if ( (rawtx= jstr(retjson,"rawtx")) != 0 && (vins= jobj(retjson,"vins")) != 0 )
flag = 1;
}
if ( flag != 0 && vins != 0 )

Loading…
Cancel
Save