Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
31550f4280
  1. 4
      iguana/iguana777.c
  2. 19
      iguana/iguana_recv.c

4
iguana/iguana777.c

@ -755,8 +755,10 @@ void iguana_coinloop(void *arg)
if ( coin->RELAYNODE != 0 || coin->VALIDATENODE != 0 || coin->MAXPEERS == 1 ) if ( coin->RELAYNODE != 0 || coin->VALIDATENODE != 0 || coin->MAXPEERS == 1 )
{ {
if ( strcmp(coin->symbol,"BTC") == 0 ) if ( strcmp(coin->symbol,"BTC") == 0 )
printf("%s call processrecv\n",coin->symbol); fprintf(stderr,"%s call processrecv\n",coin->symbol);
flag += iguana_processrecv(myinfo,coin); flag += iguana_processrecv(myinfo,coin);
if ( strcmp(coin->symbol,"BTC") == 0 )
fprintf(stderr,"%s back processrecv\n",coin->symbol);
if ( coin->RTheight > 0 && coin->RTheight > coin->chain->bundlesize ) if ( coin->RTheight > 0 && coin->RTheight > coin->chain->bundlesize )
{ {
int32_t hdrsi,nonz,errs; struct iguana_pkhash *refP; struct iguana_bundle *bp; int32_t hdrsi,nonz,errs; struct iguana_pkhash *refP; struct iguana_bundle *bp;

19
iguana/iguana_recv.c

@ -1342,7 +1342,8 @@ int32_t iguana_processrecvQ(struct iguana_info *coin,int32_t *newhwmp) // single
while ( flag < IGUANA_MAXITERATIONS && coin->active != 0 && (req= queue_dequeue(&coin->recvQ,0)) != 0 ) while ( flag < IGUANA_MAXITERATIONS && coin->active != 0 && (req= queue_dequeue(&coin->recvQ,0)) != 0 )
{ {
flag++; flag++;
//fprintf(stderr,"flag.%d %s recvQ.%p type.%c n.%d\n",flag,req->addr != 0 ? req->addr->ipaddr : "0",req,req->type,req->n); if ( strcmp("BTC",coin->symbol);
fprintf(stderr,"%s flag.%d %s recvQ.%p type.%c n.%d\n",coin->symbol,flag,req->addr != 0 ? req->addr->ipaddr : "0",req,req->type,req->n);
if ( req->type == 'B' ) // one block with all txdata if ( req->type == 'B' ) // one block with all txdata
{ {
netBLOCKS--; netBLOCKS--;
@ -1644,21 +1645,27 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
coin->RTramchain_busy = 1; coin->RTramchain_busy = 1;
if ( coin->balanceflush != 0 ) if ( coin->balanceflush != 0 )
{ {
fprintf(stderr,"%s call balanceflush\n",coin->symbol);
if ( iguana_balanceflush(coin,coin->balanceflush) > 0 ) if ( iguana_balanceflush(coin,coin->balanceflush) > 0 )
printf("balanceswritten.%d flushed coin->balanceflush %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,coin->balanceflush,coin->longestchain/coin->chain->bundlesize); printf("balanceswritten.%d flushed coin->balanceflush %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,coin->balanceflush,coin->longestchain/coin->chain->bundlesize);
fprintf(stderr,"%s back balanceflush\n",coin->symbol);
coin->balanceflush = 0; coin->balanceflush = 0;
} }
//printf("recvQ\n"); if ( strcmp("BTC",coin->symbol) == 0 )
fprintf(stderr,"recvQ\n");
flag += iguana_processrecvQ(coin,&newhwm); flag += iguana_processrecvQ(coin,&newhwm);
//printf("reqhdrs\n"); if ( strcmp("BTC",coin->symbol) == 0 )
fprintf(stderr,"reqhdrs\n");
flag += iguana_reqhdrs(coin); flag += iguana_reqhdrs(coin);
//if ( coin->spendvectorsaved > 1 ) //if ( coin->spendvectorsaved > 1 )
{ {
if ( time(NULL) > coin->laststats+5 ) if ( time(NULL) > coin->laststats+5 )
{ {
//printf("reqblocks\n"); if ( strcmp("BTC",coin->symbol) == 0 )
printf("reqblocks\n");
flag += iguana_reqblocks(coin); flag += iguana_reqblocks(coin);
//printf("bundlestats\n"); if ( strcmp("BTC",coin->symbol) == 0 )
printf("bundlestats\n");
iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG); iguana_bundlestats(coin,str,IGUANA_DEFAULTLAG);
coin->laststats = (uint32_t)time(NULL); coin->laststats = (uint32_t)time(NULL);
} }
@ -1677,6 +1684,8 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
} }
} }
coin->RTramchain_busy = 0;//(coin->RTgenesis == 0); coin->RTramchain_busy = 0;//(coin->RTgenesis == 0);
if ( strcmp("BTC",coin->symbol) == 0 )
printf("iguana_process_msgrequestQ\n");
flag += iguana_process_msgrequestQ(myinfo,coin); flag += iguana_process_msgrequestQ(myinfo,coin);
//if ( strcmp("BTCD",coin->symbol) == 0 ) //if ( strcmp("BTCD",coin->symbol) == 0 )
// instantdex_update(SuperNET_MYINFO(0)); // instantdex_update(SuperNET_MYINFO(0));

Loading…
Cancel
Save