From 8149c542dcbcbeb9745853c6de2d68fb77fb81e0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 6 Jun 2017 13:59:19 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_transaction.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 6cee86cae..b99b94919 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -37,7 +37,10 @@ bits256 LP_broadcast(char *txname,char *symbol,char *txbytes,bits256 expectedtxi if ( (errorobj= jobj(retjson,"error")) != 0 ) { if ( jint(errorobj,"code") == -27 ) // "transaction already in block chain" + { txid = expectedtxid; + sentflag = 1; + } } free_json(retjson); } @@ -145,7 +148,7 @@ int32_t LP_spendsearch(bits256 *spendtxidp,int32_t *indp,char *symbol,bits256 se while ( errs == 0 && *indp < 0 ) { //printf("search %s ht.%d\n",symbol,loadheight); - if ( (blockjson= LP_blockjson(&h,symbol,0,loadheight)) != 0 ) + if ( (blockjson= LP_blockjson(&h,symbol,0,loadheight)) != 0 && h == loadheight ) { if ( (txids= jarray(&numtxids,blockjson,"tx")) != 0 ) { @@ -177,7 +180,7 @@ int32_t LP_spendsearch(bits256 *spendtxidp,int32_t *indp,char *symbol,bits256 se } } free_json(blockjson); - } + } else errs++; loadheight++; } char str[65]; printf("reached %s ht.%d %s/v%d\n",symbol,loadheight,bits256_str(str,*spendtxidp),*indp);