Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
434fa1c82c
  1. 4
      iguana/iguana_payments.c
  2. 2
      iguana/iguana_rpc.c
  3. 2
      iguana/iguana_sign.c
  4. 2
      iguana/tests/validaterawtransaction
  5. 2
      includes/iguana_apideclares.h

4
iguana/iguana_payments.c

@ -966,13 +966,13 @@ char *iguana_validaterawtx(struct supernet_info *myinfo,struct iguana_info *coin
return(jprint(retjson,1));
}
STRING_ARG(bitcoinrpc,validaterawtransaction,rawtx)
STRING_AND_INT(bitcoinrpc,validaterawtransaction,rawtx,suppress)
{
uint8_t *extraspace; char *retstr; struct iguana_msgtx msgtx; int32_t extralen=65536;
if ( remoteaddr != 0 )
return(clonestr("{\"error\":\"no remote\"}"));
extraspace = calloc(1,extralen);
retstr = iguana_validaterawtx(myinfo,coin,&msgtx,extraspace,extralen,rawtx,0,0);
retstr = iguana_validaterawtx(myinfo,coin,&msgtx,extraspace,extralen,rawtx,0,suppress);
free(extraspace);
return(retstr);
}

2
iguana/iguana_rpc.c

@ -524,7 +524,7 @@ static char *decoderawtransaction(RPCARGS)
static char *validaterawtransaction(RPCARGS)
{
return(sglue1(0,CALLGLUE,"bitcoinrpc","validaterawtransaction","rawtx",params[0]));
return(sglue2(0,CALLGLUE,"bitcoinrpc","validaterawtransaction","rawtx",params[0],"suppress",params[1]));
}
static char *decodescript(RPCARGS)

2
iguana/iguana_sign.c

@ -871,6 +871,8 @@ void iguana_addscript(struct iguana_info *coin,cJSON *dest,uint8_t *script,int32
return;
scriptstr = scriptbuf, maxlen = sizeof(scriptbuf);
init_hexbytes_noT(scriptstr,script,scriptlen);
if ( strcmp(fieldname,"userdata") == 0 )
printf("SCRIPT_USERDATA.(%s)\n",scriptstr);
if ( strcmp(fieldname,"coinbase") == 0 )
jaddstr(dest,"coinbase",scriptstr);
else

2
iguana/tests/validaterawtransaction

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"validaterawtransaction\",\"params\":[\"0100000001d330b1a60b68272d1249a178605ef699e26772a642a68d2e0558a7a558dc420100000000b4483045022100c4de2343865be62552137fc594a5acbe8db036aa7fc811ed7819966f6b30a0400220522776e79aff3ec77947837c03c2a6a11a1c1953f551fc0b6e87350a10c86b6601514c676304b762a657b1752102a9669e63ef1ab04913615c2f3887ea3584f81e5f08feee9535b19ab3739d8afdac67a91418a616c8617d1bbae6369e5d41c2cd1e5d4c0f9c88210398a4cb9f6ea7c52a4e27455028a95e2e4e397a110fb75f072c2c58a8bdcbf4baac685100000000000001d441\"]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"validaterawtransaction\",\"params\":[\"0100000001d330b1a60b68272d1249a178605ef699e26772a642a68d2e0558a7a558dc420100000000b4483045022100c4de2343865be62552137fc594a5acbe8db036aa7fc811ed7819966f6b30a0400220522776e79aff3ec77947837c03c2a6a11a1c1953f551fc0b6e87350a10c86b6601514c676304b762a657b1752102a9669e63ef1ab04913615c2f3887ea3584f81e5f08feee9535b19ab3739d8afdac67a91418a616c8617d1bbae6369e5d41c2cd1e5d4c0f9c88210398a4cb9f6ea7c52a4e27455028a95e2e4e397a110fb75f072c2c58a8bdcbf4baac685100000000000001d441\", 1]}"

2
includes/iguana_apideclares.h

@ -68,7 +68,7 @@ TWOINTS_AND_ARRAY(bitcoinrpc,listunspent,minconf,maxconf,array);
STRING_ARG(bitcoinrpc,decodescript,scriptstr);
STRING_ARG(bitcoinrpc,decoderawtransaction,rawtx);
STRING_ARG(bitcoinrpc,validaterawtransaction,rawtx);
STRING_AND_INT(bitcoinrpc,validaterawtransaction,rawtx,suppress);
ARRAY_OBJ_INT(bitcoinrpc,createrawtransaction,vins,vouts,locktime);
ZERO_ARGS(iguana,makekeypair);

Loading…
Cancel
Save