Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ac2f210813
  1. 3
      iguana/iguana777.c
  2. 12
      iguana/iguana_init.c
  3. 3
      iguana/iguana_json.c
  4. 3
      iguana/iguana_unspents.c
  5. 3
      iguana/main.c

3
iguana/iguana777.c

@ -440,9 +440,6 @@ void iguana_coinloop(void *arg)
n = (int32_t)(long)coins[0];
coins++;
printf("begin coinloop[%d]\n",n);
for (i=0; i<n; i++)
{
}
coin = coins[0];
iguana_launchpeer(coin,"127.0.0.1");
memset(zero.bytes,0,sizeof(zero));

12
iguana/iguana_init.c

@ -352,7 +352,7 @@ void iguana_blockpurge(struct iguana_info *coin,struct iguana_block *block)
void iguana_blockspurge(struct iguana_info *coin)
{
struct iguana_block *block,*tmp;
if ( 0 && coin->blocks.hash != 0 )
if ( coin->blocks.hash != 0 )
{
HASH_ITER(hh,coin->blocks.hash,block,tmp)
{
@ -372,9 +372,12 @@ void iguana_blockspurge(struct iguana_info *coin)
void iguana_coinpurge(struct iguana_info *coin)
{
int32_t i; struct iguana_bundle *bp; char *hashstr; struct iguana_bundlereq *req; struct iguana_blockreq *breq;
coin->started = 0; coin->active = 0;
int32_t i,saved; struct iguana_bundle *bp; char *hashstr; struct iguana_bundlereq *req; struct iguana_blockreq *breq; struct iguana_helper *ptr;
saved = coin->active, coin->active = 0;
coin->started = 0;
coin->RTgenesis = 0;
while ( (ptr= queue_dequeue(&bundlesQ,0)) != 0 )
myfree(ptr,ptr->allocsize);
if ( 1 )
{
while ( (hashstr= queue_dequeue(&coin->hdrsQ,1)) != 0 )
@ -389,7 +392,7 @@ void iguana_coinpurge(struct iguana_info *coin)
{
if ( req->blocks != 0 )
myfree(req->blocks,sizeof(*req->blocks) * req->n), req->blocks = 0;
if ( 0 && req->hashes != 0 )
if ( req->hashes != 0 )
myfree(req->hashes,sizeof(*req->hashes) * req->n), req->hashes = 0;
myfree(req,req->allocsize);
}
@ -407,6 +410,7 @@ void iguana_coinpurge(struct iguana_info *coin)
coin->current = coin->lastpending = 0;
memset(coin->bundles,0,sizeof(coin->bundles));
iguana_blockspurge(coin);
coin->active = saved;
}
struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialheight,int32_t mapflags)

3
iguana/iguana_json.c

@ -623,12 +623,9 @@ STRING_ARG(iguana,startcoin,activecoin)
STRING_ARG(iguana,stopcoin,activecoin)
{
struct iguana_helper *ptr;
if ( coin != 0 )
{
coin->active = 0;
while ( (ptr= queue_dequeue(&bundlesQ,0)) != 0 )
myfree(ptr,ptr->allocsize);
iguana_coinpurge(coin);
return(clonestr("{\"result\":\"coin stopped\"}"));
} else return(clonestr("{\"error\":\"stopcoin needs coin\"}"));

3
iguana/iguana_unspents.c

@ -1411,9 +1411,6 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu
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));
struct iguana_helper *ptr;
while ( (ptr= queue_dequeue(&bundlesQ,0)) != 0 )
myfree(ptr,ptr->allocsize);
iguana_coinpurge(coin);
//exit(-1);
//coin->balanceswritten = iguana_volatileinit(coin);

3
iguana/main.c

@ -390,9 +390,6 @@ void mainloop(struct supernet_info *myinfo)
printf("%s is stuck too long, purging files for %d\n",coin->symbol,bp->hdrsi);
if ( coin->started != 0 )
{
struct iguana_helper *ptr;
while ( (ptr= queue_dequeue(&bundlesQ,0)) != 0 )
myfree(ptr,ptr->allocsize);
iguana_coinpurge(coin);
while ( coin->started == 0 )
{

Loading…
Cancel
Save