jl777 8 years ago
parent
commit
ce0d8d5913
  1. 4
      basilisk/basilisk.c
  2. 1
      iguana/iguana_unspents.c
  3. 6
      iguana/iguana_wallet.c
  4. 2
      iguana/tests/listunspent

4
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);
}

1
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);

6
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);
}
}

2
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\"]]}"

Loading…
Cancel
Save