Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
07395549b2
  1. 1
      iguana/exchanges/bitcoin.c
  2. 1
      iguana/ramchain_api.c

1
iguana/exchanges/bitcoin.c

@ -874,6 +874,7 @@ cJSON *bitcoin_hex2json(struct iguana_info *coin,bits256 *txidp,struct iguana_ms
decode_hex(serialized,len,txbytes);
vpnstr[0] = 0;
memset(txidp,0,sizeof(*txidp));
printf("bitcoin_hex2json len.%d\n",len);
if ( (n= iguana_rwmsgtx(coin,0,txobj,serialized,len + 32768,msgtx,txidp,vpnstr)) <= 0 )
{
printf("error from rwmsgtx\n");

1
iguana/ramchain_api.c

@ -193,6 +193,7 @@ STRING_ARG(bitcoinrpc,decoderawtransaction,rawtx)
if ( (strlen(rawtx) & 1) != 0 )
return(clonestr("{\"error\":\"rawtx hex has odd length\"}"));
txobj = bitcoin_hex2json(coin,&txid,0,rawtx);
char str[65]; printf("got txid.(%s)\n",bits256_str(str,txid));
} else txobj = cJSON_CreateObject();
return(jprint(txobj,1));
}

Loading…
Cancel
Save