Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0b6502dd6a
  1. 10
      iguana/iguana_payments.c
  2. 2
      iguana/tests/listunspent

10
iguana/iguana_payments.c

@ -489,14 +489,16 @@ char *iguana_createrawtx(struct supernet_info *myinfo,struct iguana_info *coin,c
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses,vals,spendscriptstr)
STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses_str,vals_str,spendscriptstr)
{
cJSON *vins=0,*retjson; char *rawtx=0,*symbol=0; int64_t txfee,satoshis; uint32_t locktime,minconf;
cJSON *vins=0,*retjson,*vals,*addresses; char *rawtx=0,*symbol=0; int64_t txfee,satoshis; uint32_t locktime,minconf;
retjson = cJSON_CreateObject();
vals = cJSON_Parse(jstr(vals_str,0));
addresses = cJSON_Parse(jstr(addresses_str,0));
if ( vals != 0 )
printf("vals.(%s)\n",jprint(vals,0));
printf("vals.(%s) (%s)\n",jprint(vals,0),jstr(vals_str,0));
if ( addresses != 0 )
printf("addresses.(%s)\n",jprint(addresses,0));
printf("addresses.(%s) (%s)\n",jprint(addresses,0),jstr(addresses_str,0));
if ( (symbol= jstr(vals,"coin")) != 0 && (coin= iguana_coinfind(symbol)) != 0 )
{
minconf = juint(vals,"minconf");

2
iguana/tests/listunspent

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"listunspent\",\"params\":[1, 9999999, [\"RAoMou7euzvDwa9dQwjrNB5A41hrAWgvBt\"]]}"
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"listunspent\",\"params\":[1, 9999999, [\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\"]]}"

Loading…
Cancel
Save