From ce0d8d591382ed597b290c46fc127a9e25f823ee Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Sep 2016 13:10:16 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 4 ++-- iguana/iguana_unspents.c | 1 + iguana/iguana_wallet.c | 6 ------ iguana/tests/listunspent | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index a1a1a4b07..36e3ff171 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -951,7 +951,7 @@ void basilisks_loop(void *arg) } // else printf("not notary %p %d\n",notary,myinfo->NOTARY.RELAYID); else if ( myinfo->expiration != 0 ) { - HASH_ITER(hh,myinfo->allcoins,coin,tmpcoin) + /*HASH_ITER(hh,myinfo->allcoins,coin,tmpcoin) { if ( strcmp(coin->symbol,"NOTARY") != 0 && (myinfo->Cunspents == 0 || time(NULL) > coin->lastunspentsupdate+60) ) { @@ -960,7 +960,7 @@ void basilisks_loop(void *arg) coin->lastunspentsupdate = now; //printf(">>>>>>>>>>>>> update %s finished\n",coin->symbol); } - } + }*/ if ( myinfo->IAMLP != 0 || myinfo->DEXactive > now ) basilisk_requests_poll(myinfo); } diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 8bcd08b79..2d1d57262 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1002,6 +1002,7 @@ cJSON *iguana_RTlistunspent(struct supernet_info *myinfo,struct iguana_info *coi } else { + basilisk_unspents_update(myinfo,coin); portable_mutex_lock(&myinfo->bu_mutex); if ( (unspents= myinfo->Cunspents) != 0 && (array= jobj(unspents,coin->symbol)) != 0 ) unspents = jduplicate(array); diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index 3fa792ad4..30174cfa3 100755 --- a/iguana/iguana_wallet.c +++ b/iguana/iguana_wallet.c @@ -762,12 +762,6 @@ cJSON *iguana_walletiterate(struct supernet_info *myinfo,struct iguana_info *coi if ( flag < -1 ) { HASH_DELETE(hh,wacct->waddr,waddr); - /*if ( waddr->Cunspents != 0 ) - free_json(waddr->Cunspents), waddr->Cunspents = 0; - if ( waddr->Cspends != 0 ) - free_json(waddr->Cspends), waddr->Cspends = 0; - */ - //printf("walletiterate: %p free %s\n",waddr,waddr->coinaddr); myfree(waddr,sizeof(*waddr) + waddr->scriptlen); } } diff --git a/iguana/tests/listunspent b/iguana/tests/listunspent index 119eacd67..c1795bbaa 100755 --- a/iguana/tests/listunspent +++ b/iguana/tests/listunspent @@ -1 +1 @@ -curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listunspent\",\"params\":[1, 9999999, [\"RD1rFucYCMhCGeEqdztivP3DFdJwVAzXn7\"]]}" +curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"listunspent\",\"params\":[1, 9999999, [\"1E2ac2gxeFR2ir1H3vqETTperWkiXkwy99\"]]}"