Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9bc4cede70
  1. 2
      iguana/SuperNET.c
  2. 6
      iguana/ramchain_api.c

2
iguana/SuperNET.c

@ -649,7 +649,7 @@ int32_t SuperNET_destination(struct supernet_info *myinfo,uint32_t *destipbitsp,
char *SuperNET_JSON(struct supernet_info *myinfo,cJSON *json,char *remoteaddr,uint16_t port)
{
char hexbuf[8192]; bits256 category,subhash;
int32_t hexlen,destflag,maxdelay,flag=0,newflag=0; uint32_t destipbits,timestamp; cJSON *retjson;
int32_t hexlen,destflag,maxdelay,flag=0,newflag=0; uint32_t destipbits,timestamp; //cJSON *retjson;
char *forwardstr=0,*retstr=0,*agent=0,*method=0,*message,*hexmsg=0,*jsonstr=0; uint64_t tag;
//printf("SuperNET_JSON.(%s)\n",jprint(json,0));
if ( remoteaddr != 0 && strcmp(remoteaddr,"127.0.0.1") == 0 )

6
iguana/ramchain_api.c

@ -187,14 +187,16 @@ HASH_AND_INT(bitcoinrpc,getrawtransaction,txid,verbose)
STRING_ARG(bitcoinrpc,decoderawtransaction,rawtx)
{
cJSON *txobj; bits256 txid;
cJSON *txobj = 0; 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);
char str[65]; printf("got txid.(%s)\n",bits256_str(str,txid));
} else txobj = cJSON_CreateObject();
}
if ( txobj == 0 )
txobj = cJSON_CreateObject();
return(jprint(txobj,1));
}

Loading…
Cancel
Save