From 5095b3bb99b67ff743f36290ad1c6cc0b8d23e78 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 23 Mar 2016 21:20:57 -0300 Subject: [PATCH] test --- iguana/iguana_unspents.c | 9 ++++++++- iguana/main.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 4e6f88ba2..60feffcfb 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -767,8 +767,15 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu coin->balanceswritten = numhdrsi; iguana_utxoupdate(coin,-1,0,0,0,-1,0,-1); // free hashtables for (hdrsi=0; hdrsibundles[hdrsi]) == 0 || iguana_mapvolatiles(coin,&bp->ramchain) != 0 ) + if ( (bp= coin->bundles[hdrsi]) == 0 ) + { + if ( bp->ramchain.A != 0 ) + free(bp->ramchain.A); + if ( bp->ramchain.Uextras != 0 ) + free(bp->ramchain.Uextras); + if ( iguana_mapvolatiles(coin,&bp->ramchain) != 0 ) printf("error mapping bundle.[%d]\n",hdrsi); + } char str[65]; printf("BALANCES WRITTEN for %d bundles %s\n",coin->balanceswritten,bits256_str(str,coin->balancehash)); return(coin->balanceswritten); } diff --git a/iguana/main.c b/iguana/main.c index 5d4ca577f..26840841d 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1127,7 +1127,7 @@ void iguana_main(void *arg) sleep(1); char *str; //iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}")); - if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":128,\"endpend\":128,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":64,\"poll\":1}"),0)) != 0 ) + if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":3333,\"endpend\":3333,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0)) != 0 ) { free(str); if ( 0 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0)) != 0 )