From 22392fa90b361c4075606448f647b8327c5524e5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 May 2016 02:02:51 -0500 Subject: [PATCH] test --- iguana/swaps/iguana_BTCswap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/swaps/iguana_BTCswap.c b/iguana/swaps/iguana_BTCswap.c index 3b6100c9c..681092c2c 100755 --- a/iguana/swaps/iguana_BTCswap.c +++ b/iguana/swaps/iguana_BTCswap.c @@ -616,15 +616,11 @@ void instantdex_newjson(struct supernet_info *myinfo,struct bitcoin_swapinfo *sw jaddbits256(newjson,"A1",swap->mypubs[1]); if ( bits256_nonz(swap->pubAm) == 0 && swap->otherchoosei >= 0 && bits256_nonz(swap->privkeys[swap->otherchoosei]) != 0 ) swap->pubAm = bitcoin_pubkey33(myinfo->ctx,pubkey,swap->privkeys[swap->otherchoosei]); - if ( bits256_nonz(swap->pubAm) != 0 ) - jaddbits256(newjson,"pubAm",swap->pubAm); } else { if ( bits256_nonz(swap->pubBn) == 0 && swap->otherchoosei >= 0 && bits256_nonz(swap->privkeys[swap->otherchoosei]) != 0 ) swap->pubBn = bitcoin_pubkey33(myinfo->ctx,pubkey,swap->privkeys[swap->otherchoosei]); - if ( bits256_nonz(swap->pubBn) != 0 ) - jaddbits256(newjson,"pubBn",swap->pubBn); jaddbits256(newjson,"B0",swap->mypubs[0]); jaddbits256(newjson,"B1",swap->mypubs[1]); if ( (swap->otherhavestate & INSTANTDEX_ORDERSTATE_HAVEDEPOSIT) == 0 && swap->deposit != 0 && jobj(newjson,"deposit") == 0 ) @@ -640,6 +636,10 @@ void instantdex_newjson(struct supernet_info *myinfo,struct bitcoin_swapinfo *sw printf("add payment.(%s) have.%x\n",swap->payment->txbytes,swap->havestate); } } + if ( bits256_nonz(swap->pubAm) != 0 ) + jaddbits256(newjson,"pubAm",swap->pubAm); + if ( bits256_nonz(swap->pubBn) != 0 ) + jaddbits256(newjson,"pubBn",swap->pubBn); } cJSON *instantdex_parseargjson(struct supernet_info *myinfo,struct exchange_info *exchange,struct bitcoin_swapinfo *swap,cJSON *argjson,int32_t deckflag) @@ -1229,7 +1229,7 @@ char *instantdex_statemachine(struct instantdex_stateinfo *states,int32_t numsta } else { - if ( strcmp(cmdstr,"poll") != 0 ) + if ( 0 && strcmp(cmdstr,"poll") != 0 ) { if ( swap->pollevent != 0 ) instantdex_eventfree(swap->pollevent);