From 0734cda9a0a51a5704bc8f9652b9d235ff343dc7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 19 Sep 2017 20:54:32 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_scan.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/iguana/exchanges/LP_scan.c b/iguana/exchanges/LP_scan.c index 089cf9625..7c49ed039 100644 --- a/iguana/exchanges/LP_scan.c +++ b/iguana/exchanges/LP_scan.c @@ -27,36 +27,22 @@ int32_t LP_blockinit(struct iguana_info *coin,int32_t height) if ( (txs= jarray(&numtx,blockobj,"tx")) != 0 ) { for (iter=0; iter<2; iter++) - for (i=0; iheight == 0 ) - tx->height = height; - else if ( tx->height != height ) + txid = jbits256i(txs,i); + if ( (tx= LP_transactionfind(coin,txid)) != 0 ) { - printf("LP_blockinit: tx->height %d != %d\n",tx->height,height); - tx->height = height; - } - if ( iter == 1 ) - for (j=0; j<10; j++) + if ( tx->height == 0 ) + tx->height = height; + else if ( tx->height != height ) { - if (LP_transactioninit(coin,txid,iter,0) == 0 ) - break; - printf("%s transaction ht.%d init error.%d, pause\n",bits256_str(str,txid),height,j); - sleep(10); + printf("LP_blockinit: tx->height %d != %d\n",tx->height,height); + tx->height = height; } - } - else - { - for (j=0; j<10; j++) - { - if (LP_transactioninit(coin,txid,iter,0) == 0 ) - break; - printf("%s transaction ht.%d init error.%d, pause\n",bits256_str(str,txid),height,j); - sleep(10); - } + if ( iter == 1 ) + LP_transactioninit(coin,txid,iter,0); + } else LP_transactioninit(coin,txid,iter,0); } } }