From ef7b7c48103e8d8428c6fe4c7791441877712123 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 16 May 2016 23:18:13 -0500 Subject: [PATCH] test --- iguana/iguana_payments.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index 15491f943..d5ef10b7c 100755 --- a/iguana/iguana_payments.c +++ b/iguana/iguana_payments.c @@ -538,7 +538,7 @@ char *iguana_createrawtx(struct supernet_info *myinfo,uint32_t rawtxtag,char *sy STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses,vals,spendscriptstr) { - cJSON *vins=0,*retjson,*hexjson; char buf[IGUANA_MAXSCRIPTSIZE],*str,*rawtx=0,*symbol=0; int64_t txfee,satoshis; uint32_t i,locktime,minconf,rawtxtag; struct iguana_peer *addr; + cJSON *vins=0,*retjson,*hexjson,*valsobj; char buf[IGUANA_MAXSCRIPTSIZE],*str,*rawtx=0,*symbol=0; int64_t txfee,satoshis; uint32_t i,locktime,minconf,rawtxtag; struct iguana_peer *addr; printf("RAWTX changeaddr.%s (%s)\n",changeaddr==0?"":changeaddr,jprint(json,0)); retjson = cJSON_CreateObject(); if ( spendscriptstr != 0 && spendscriptstr[0] != 0 && (symbol= jstr(vals,"coin")) != 0 ) @@ -560,6 +560,9 @@ STRING_ARRAY_OBJ_STRING(iguana,rawtx,changeaddr,addresses,vals,spendscriptstr) jaddnum(hexjson,"request",1); jaddnum(hexjson,"rawtxtag",rawtxtag); jadd(hexjson,"vins",vins); + valsobj = cJSON_CreateObject(); + jaddstr(valsobj,"coin",symbol); + jadd(hexjson,"vals",hexjson); str = jprint(hexjson,1); init_hexbytes_noT(buf,(uint8_t *)str,(int32_t)strlen(str)); free(str);