Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
44f2643670
  1. 3
      crypto777/iguana_utils.c
  2. 5
      iguana/ramchain_api.c

3
crypto777/iguana_utils.c

@ -325,9 +325,6 @@ int32_t decode_hex(unsigned char *bytes,int32_t n,char *hex)
bytes[0] = unhex(hex[0]);
printf("decode_hex n.%d hex[0] (%c) -> %d hex.(%s) [n*2+1: %d] [n*2: %d %c] len.%ld\n",n,hex[0],bytes[0],hex,hex[n*2+1],hex[n*2],hex[n*2],(long)strlen(hex));
}
#ifdef __APPLE__
getchar();
#endif
bytes++;
hex++;
adjust = 1;

5
iguana/ramchain_api.c

@ -189,8 +189,11 @@ STRING_ARG(bitcoinrpc,decoderawtransaction,rawtx)
{
cJSON *txobj; bits256 txid;
if ( rawtx != 0 && rawtx[0] != 0 )
{
if ( (strlen(rawtx) & 1) != 0 )
return(clonestr("{\"error\":\"rawtx hex has odd length\"}"));
txobj = bitcoin_hex2json(coin,&txid,0,rawtx);
else txobj = cJSON_CreateObject();
} else txobj = cJSON_CreateObject();
return(jprint(txobj,1));
}

Loading…
Cancel
Save