From 93296f43e6330cff2b7419a0d8e629d018a9a65e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 17 Sep 2016 05:25:38 -0300 Subject: [PATCH] test --- iguana/coins/genbtc | 2 +- iguana/coins/genbtc.json | 2 +- iguana/iguana777.c | 21 ++++++++++++--------- iguana/main.c | 5 +++++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/iguana/coins/genbtc b/iguana/coins/genbtc index 9ffd8b2f1..4179c8fea 100755 --- a/iguana/coins/genbtc +++ b/iguana/coins/genbtc @@ -1 +1 @@ -curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":11,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":8333}" +curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":8333}" diff --git a/iguana/coins/genbtc.json b/iguana/coins/genbtc.json index 94931216a..c2b0314d6 100755 --- a/iguana/coins/genbtc.json +++ b/iguana/coins/genbtc.json @@ -1 +1 @@ -{"numhelpers":1,"prefetchlag":11,"poll":1,"active":1,"agent":"iguana","method":"addcoin","newcoin":"BTC","startpend":16,"endpend":16,"services":129,"maxpeers":512,"RELAY":1,"VALIDATE":1,"portp2p":8333} +{"numhelpers":1,"prefetchlag":-1,"poll":1,"active":1,"agent":"iguana","method":"addcoin","newcoin":"BTC","startpend":16,"endpend":16,"services":129,"maxpeers":512,"RELAY":1,"VALIDATE":1,"portp2p":8333} diff --git a/iguana/iguana777.c b/iguana/iguana777.c index aabb1ea42..1065afc56 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -538,15 +538,18 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int printf("%s helperid.%d waiting for spendvectorsaved.%u v.%d u.%d b.%d vs max.%d\n",coin->symbol,helperid,coin->spendvectorsaved,iguana_validated(coin),iguana_utxofinished(coin),iguana_balancefinished(coin),max); sleep(2*IGUANA_NUMHELPERS+3); }*/ - if ( helperid < incr ) + if ( convertflag == 0 ) { - for (hdrsi=helperid; hdrsibundles[hdrsi],convertflag); - } - while ( (n= iguana_convertfinished(coin)) < max ) - { - //printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount); - sleep(IGUANA_NUMHELPERS+3); + if ( helperid < incr ) + { + for (hdrsi=helperid; hdrsibundles[hdrsi],convertflag); + } + while ( (n= iguana_convertfinished(coin)) < max ) + { + //printf("helperid.%d convertfinished.%d vs max %d bundlescount.%d\n",helperid,n,max,coin->bundlescount); + sleep(IGUANA_NUMHELPERS+3); + } } if ( helperid == 0 ) { @@ -691,7 +694,7 @@ void iguana_helper(void *arg) if ( coin->firstRTheight == 0 ) { if ( coin->spendvectorsaved == 1 ) - iguana_utxogen(myinfo,coin,helperid,0); + iguana_utxogen(myinfo,coin,helperid,1); else if ( coin->spendvectorsaved > 1 && (coin->spendvalidated & (1 << helperid)) == 0 ) { //printf("%s spendvectorsaved.%u helperid.%d validate\n",coin->symbol,coin->spendvectorsaved,helperid); diff --git a/iguana/main.c b/iguana/main.c index c92acbce8..eafd09333 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -339,7 +339,12 @@ char *SuperNET_JSON(struct supernet_info *myinfo,struct iguana_info *coin,cJSON void iguana_exit(struct supernet_info *myinfo,struct iguana_bundle *bp) { + static int exiting; int32_t i,j,iter; struct iguana_info *coin,*tmp; + if ( exiting != 0 ) + while ( 1 ) + sleep(1); + exiting = 1; if ( myinfo == 0 ) myinfo = SuperNET_MYINFO(0); printf("start EXIT\n");