diff --git a/iguana/coins/genbtc8.json b/iguana/coins/genbtc8.json new file mode 100755 index 000000000..8658b8b19 --- /dev/null +++ b/iguana/coins/genbtc8.json @@ -0,0 +1 @@ +{"numhelpers":8,"prefetchlag":-1,"poll":1,"active":1,"agent":"iguana","method":"addcoin","newcoin":"BTC","startpend":16,"endpend":16,"services":129,"maxpeers":512,"RELAY":1,"VALIDATE":1,"portp2p":8333} diff --git a/iguana/genbtcloop8 b/iguana/genbtcloop8 new file mode 100755 index 000000000..3fccf5b5c --- /dev/null +++ b/iguana/genbtcloop8 @@ -0,0 +1,6 @@ +while true +do +../agents/iguana coins/genbtc8.json +sleep 3 +done + diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index adb3240ba..3bde7ffe4 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -936,7 +936,7 @@ void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int3 return((void *)"already have rawdata"); return(0); } - //printf("len.%d filesize.%ld\n",len,filesize); + printf("malformed delete.(%s) len.%d filesize.%ld\n",fname,len,filesize); fclose(fp); OS_removefile(fname,0); } @@ -954,7 +954,7 @@ void *iguana_RTrawdata(struct iguana_info *coin,bits256 hash2,uint8_t *data,int3 if ( fwrite(recvlenp,1,sizeof(*recvlenp),fp) != sizeof(*recvlenp) || fwrite(numtxp,1,sizeof(*numtxp),fp) != sizeof(*numtxp) || fwrite(data,1,*recvlenp,fp) != *recvlenp ) printf("error writing %s len.%d numtx.%d\n",bits256_str(str,hash2),*recvlenp,*numtxp); fclose(fp); - //printf("numtx.%d len.%d %s hwm.%d L.%d\n",*numtxp,*recvlenp,fname,coin->blocks.hwmchain.height,coin->longestchain); + printf("numtx.%d len.%d %s hwm.%d L.%d\n",*numtxp,*recvlenp,fname,coin->blocks.hwmchain.height,coin->longestchain); } else printf("couldnt create %s\n",fname); } else if ( (ptr= OS_mapfile(fname,&filesize,0)) != 0 ) @@ -1008,7 +1008,7 @@ int32_t iguana_RTiterate(struct supernet_info *myinfo,struct iguana_info *coin,i coin->RTrawdata[offset] = iguana_RTrawdata(coin,block->RO.hash2,0,&coin->RTrecvlens[offset],&coin->RTnumtx[offset],0); if ( (numtx= coin->RTnumtx[offset]) == 0 || (serialized= coin->RTrawdata[offset]) == 0 || (recvlen= coin->RTrecvlens[offset]) == 0 ) { - //printf("%s errs.%d cant load %s ht.%d polarity.%lld numtx.%d %p recvlen.%d\n",coin->symbol,errs,bits256_str(str,block->RO.hash2),block->height,(long long)polarity,coin->RTnumtx[offset],coin->RTrawdata[offset],coin->RTrecvlens[offset]); + char str[65]; printf("%s cant load %s ht.%d polarity.%lld numtx.%d %p recvlen.%d\n",coin->symbol,bits256_str(str,block->RO.hash2),block->height,(long long)polarity,coin->RTnumtx[offset],coin->RTrawdata[offset],coin->RTrecvlens[offset]); struct iguana_peer *addr; // int32_t errs = 0; iguana_blockhashset("RTblock",coin,coin->firstRTheight+offset,block->RO.hash2,1); if ( (bp= coin->bundles[block->hdrsi]) != 0 ) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 6a209723a..41843bcca 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -747,7 +747,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru bp = 0, bundlei = -2; if ( iguana_bundlefind(coin,&bp,&bundlei,origtxdata->zblock.RO.prev_block) == 0 ) { - //printf("gotblockM: RTblock? %s\n",bits256_str(str,origtxdata->zblock.RO.hash2)); + printf("gotblockM: RTblock? %s\n",bits256_str(str,origtxdata->zblock.RO.hash2)); numtx = origtxdata->zblock.RO.txn_count; iguana_RTgotblock(coin,origtxdata->zblock.RO.hash2,data,&recvlen,&numtx); req = iguana_recv_bundlereq(coin,addr,0,H,data,recvlen,0,-1,origtxdata); @@ -797,7 +797,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru bp->speculative[bundlei] = bp->hashes[bundlei]; bp->blocks[bundlei] = block; } - //printf("getblockM update [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2)); + printf("getblockM update [%d:%d] %s\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2)); block->txvalid = 1; if ( block->fpipbits != 0 && block->fpos >= 0 ) { @@ -811,7 +811,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru } if ( bundlei > 1 ) { - //printf("DUP s.%d [%d:%d].(%s) %s n%d\n",numsaved,bp!=0?bp->hdrsi:-1,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2),addr->ipaddr,addr->pendblocks); + printf("DUP s.%d [%d:%d].(%s) %s n%d\n",numsaved,bp!=0?bp->hdrsi:-1,bundlei,bits256_str(str,origtxdata->zblock.RO.hash2),addr->ipaddr,addr->pendblocks); } return; } @@ -826,7 +826,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru copyflag = (coin->enableCACHE != 0) && (strcmp(coin->symbol,"BTC") != 0); req = iguana_recv_bundlereq(coin,addr,copyflag,H,data,recvlen,bp,bundlei,txdata); queue_enqueue("recvQ",&coin->recvQ,&req->DL,0); - if ( 0 && strcmp("BTCD",coin->symbol) == 0 ) + //if ( 0 && strcmp("BTCD",coin->symbol) == 0 ) printf("[%d:%d].s%d %s Q.(%s) %s\n",bp->hdrsi,bundlei,numsaved,coin->symbol,bits256_str(str,origtxdata->zblock.RO.hash2),addr->ipaddr); //if ( (bp == coin->current || (coin->peers != 0 && ) && (rand() % coin->chain->bundlesize) < numsaved ) if ( numsaved < coin->chain->bundlesize )