From 0b6502dd6a1db5af5701d017ea4dcadac5ef3248 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 15 May 2016 21:17:58 -0500 Subject: [PATCH] test --- iguana/iguana_payments.c | 10 ++++++---- iguana/tests/listunspent | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index 88c97e0e3..c6dd37362 100755 --- a/iguana/iguana_payments.c +++ b/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"); diff --git a/iguana/tests/listunspent b/iguana/tests/listunspent index 5e98ffdc8..c07c3443e 100755 --- a/iguana/tests/listunspent +++ b/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\"]]}"