From 1b5be9df2f0ef0566ac7b8d0512bca5818b36cc7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 May 2016 00:26:24 -0500 Subject: [PATCH] test --- iguana/swaps/iguana_BTCswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/swaps/iguana_BTCswap.c b/iguana/swaps/iguana_BTCswap.c index f882c2aea..6d836fd2d 100755 --- a/iguana/swaps/iguana_BTCswap.c +++ b/iguana/swaps/iguana_BTCswap.c @@ -354,7 +354,7 @@ int32_t instantdex_paymentverify(struct supernet_info *myinfo,struct iguana_info int32_t instantdex_altpaymentverify(struct supernet_info *myinfo,struct iguana_info *coin,struct bitcoin_swapinfo *swap,cJSON *argjson) { cJSON *txobj; bits256 txid; uint32_t n; int32_t i,retval = -1; - struct iguana_msgtx msgtx; uint8_t script[512]; char *altmsigaddr,msigaddr[64]; + struct iguana_msgtx msgtx; uint8_t script[512]; char *altmsigaddr=0,msigaddr[64]; if ( swap->altpayment != 0 && (altmsigaddr= jstr(argjson,"altmsigaddr")) != 0 ) { if ( (txobj= bitcoin_hex2json(coin,&txid,&msgtx,swap->altpayment->txbytes)) != 0 ) @@ -379,7 +379,7 @@ int32_t instantdex_altpaymentverify(struct supernet_info *myinfo,struct iguana_i } else printf("msig mismatch.(%s %s) or n.%d != %d\n",msigaddr,altmsigaddr,n,msgtx.vouts[0].pk_scriptlen); free_json(txobj); } else printf("bitcoin_hex2json error\n"); - } else printf("no altpayment.%p or no altmsig.%s\n",swap->altpayment,altmsigaddr); + } else printf("no altpayment.%p or no altmsig.%s\n",swap->altpayment,altmsigaddr!=0?altmsigaddr:""); return(retval); }