Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
09ca10cbc3
  1. 2
      iguana/iguana_msg.c
  2. 2
      iguana/iguana_peers.c
  3. 4
      iguana/iguana_recv.c

2
iguana/iguana_msg.c

@ -438,7 +438,7 @@ int32_t iguana_msgparser(struct iguana_info *coin,struct iguana_peer *addr,struc
strcpy(addr->lastcommand,H->command);
}
retval = 0;
usleep(1000);
//usleep(1000);
//printf("iguana_msgparser %s parse.(%s)\n",addr->ipaddr,H->command);
if ( strcmp(H->command,"SuperNET") == 0 )
{

2
iguana/iguana_peers.c

@ -928,7 +928,7 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr)
//if ( addr->supernet != 0 )
// iguana_send_supernet(coin,addr,"{\"agent\":\"SuperNET\",\"method\":\"getpeers\"}",0);
iguana_send_version(coin,addr,coin->myservices);
sleep(10);
sleep(1+(rand()%5));
iguana_queue_send(coin,addr,0,serialized,"getaddr",0,0,0);
run = 0;
while ( addr->usock >= 0 && addr->dead == 0 && coin->peers.shuttingdown == 0 )

4
iguana/iguana_recv.c

@ -464,7 +464,7 @@ struct iguana_bundlereq *iguana_recvblock(struct iguana_info *coin,struct iguana
struct iguana_bundle *prevbp=0,*bp=0; int32_t prevbundlei=-2,bundlei = -2; struct iguana_block *prevblock,*block;
bp = iguana_bundleset(coin,&block,&bundlei,origblock);
usleep(1000);
//usleep(1000);
//static int total; char str[65]; printf("RECV %s [%d:%d] block.%08x | %d\n",bits256_str(str,origblock->RO.hash2),bp!=0?bp->hdrsi:-1,bundlei,block->fpipbits,total++);
iguana_bundlefind(coin,&prevbp,&prevbundlei,origblock->RO.prev_block);
if ( prevbp != 0 && prevbundlei >= 0 && (prevblock= iguana_blockfind(coin,origblock->RO.prev_block)) != 0 )
@ -908,7 +908,7 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded
{
coin->backstopmillis = OS_milliseconds();
iguana_blockQ(coin,bp,bundlei,iguana_blockhash(coin,coin->backstop),1);
//if ( (rand() % 100) == 0 )
if ( (rand() % 100) == 0 )
printf("MAINCHAIN.%d threshold %.3f %.3f lag %.3f\n",coin->blocks.hwmchain.height+1,threshold,coin->backstopmillis,lag);
}
}

Loading…
Cancel
Save