From 59bbc648d3e20d4e937576c4941aa4cc2936ae13 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 29 May 2016 19:21:59 -0500 Subject: [PATCH] test --- iguana/confs/SYS_peers.txt | 2 +- iguana/iguana_peers.c | 5 +++-- iguana/iguana_ramchain.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iguana/confs/SYS_peers.txt b/iguana/confs/SYS_peers.txt index 6e21f844e..9a2909a9b 100644 --- a/iguana/confs/SYS_peers.txt +++ b/iguana/confs/SYS_peers.txt @@ -1,2 +1,2 @@ 198.147.29.138 -118.244.207.7 \ No newline at end of file +118.244.207.7 diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 881824e38..702b862c3 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -790,6 +790,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr) printf("%s possible peer.(%s) %x already there\n",coin->symbol,ipaddr,(uint32_t)coin->peers.active[i].ipbits); return(0); } + printf("Q possible.(%s)\n",ipaddr); queue_enqueue("possibleQ",&coin->possibleQ,queueitem(ipaddr),1); return((uint32_t)time(NULL)); } @@ -804,7 +805,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr) return((uint32_t)time(NULL)); } #endif - //printf("check possible peer.(%s)\n",ipaddr); + printf("check possible peer.(%s)\n",ipaddr); for (i=n=0; iMAXPEERS; i++) { if ( strcmp(ipaddr,coin->peers.active[i].ipaddr) == 0 ) @@ -831,7 +832,7 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr) expand_ipbits(checkaddr,ipbits); if ( strcmp(checkaddr,ipaddr) == 0 ) { - //printf("valid ipaddr.(%s) MAXPEERS.%d\n",ipaddr,coin->MAXPEERS); + printf("valid ipaddr.(%s) MAXPEERS.%d\n",ipaddr,coin->MAXPEERS); if ( (iA= iguana_iAddrhashfind(coin,ipbits,1)) != 0 ) { if ( iA->status != IGUANA_PEER_CONNECTING && iA->status != IGUANA_PEER_READY && iA->status != IGUANA_PEER_ELIGIBLE ) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 44c16a38e..410e4bc54 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -608,7 +608,7 @@ uint32_t iguana_ramchain_addspend256(struct iguana_info *coin,struct iguana_peer int64_t iguana_hashmemsize(int64_t numtxids,int64_t numunspents,int64_t numspends,int64_t numpkinds,int64_t numexternaltxids,int64_t scriptspace) { int64_t allocsize = 0; - allocsize += (scriptspace + IGUANA_MAXSCRIPTSIZE + ((numtxids + numpkinds) * (sizeof(UT_hash_handle)*2)) + (((sizeof(struct iguana_account)) * 2 * numpkinds)) + (2 * numunspents * sizeof(struct iguana_spendvector))); + allocsize += 1.25 * (scriptspace + IGUANA_MAXSCRIPTSIZE + ((numtxids + numpkinds) * (sizeof(UT_hash_handle)*2)) + (((sizeof(struct iguana_account)) * 2 * numpkinds)) + (2 * numunspents * sizeof(struct iguana_spendvector))); if ( allocsize >= (1LL << 32) ) { printf("REALLY big hashmemsize %llu, truncate and hope for best\n",(long long)allocsize);