From 07a64c7d09a6cdf93fb6ae45d13533c7b2361b37 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Sep 2016 02:03:44 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 2 +- basilisk/basilisk_MSG.c | 4 ++-- iguana/iguana_ramchain.c | 4 ++-- iguana/iguana_spendvectors.c | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 09a0c3376..467f3160b 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -860,7 +860,7 @@ void basilisks_loop(void *arg) } portable_mutex_unlock(&myinfo->messagemutex); if ( RELAYID >= 0 ) - usleep(10000); + usleep(30000); else usleep(100000); } } diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index d0e334d10..a5a09769a 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -207,7 +207,7 @@ int32_t basilisk_channelsend(struct supernet_info *myinfo,bits256 hash,uint32_t jaddnum(valsobj,"msgid",msgid); jaddnum(valsobj,"duration",duration); jaddbits256(valsobj,"sender",myinfo->myaddr.persistent); - char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s numrelays.%d:%d\n",datalen,channel,msgid,bits256_str(str,hash),NUMRELAYS,juint(valsobj,"fanout")); + //char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s numrelays.%d:%d\n",datalen,channel,msgid,bits256_str(str,hash),NUMRELAYS,juint(valsobj,"fanout")); if ( (retstr= basilisk_sendmessage(myinfo,0,0,0,hash,valsobj,hexstr)) != 0 ) free(retstr); free_json(valsobj); @@ -251,7 +251,7 @@ cJSON *basilisk_channelget(struct supernet_info *myinfo,bits256 hash,uint32_t ch msgid = (uint32_t)time(NULL); jaddnum(valsobj,"msgid",msgid); jaddnum(valsobj,"width",width); - jaddnum(valsobj,"timeout",1500); + jaddnum(valsobj,"timeout",2500); jaddnum(valsobj,"fanout",(int32_t)sqrt(NUMRELAYS)+1); jaddnum(valsobj,"minresults",1); if ( (retstr= basilisk_getmessage(myinfo,0,0,0,hash,valsobj,0)) != 0 ) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 19e9817f1..c98a99a27 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -1300,7 +1300,7 @@ int32_t iguana_bundleremove(struct iguana_info *coin,int32_t hdrsi,int32_t tmpfi for (i=0; in; i++) iguana_blockunmark(coin,bp->blocks[i],bp,i,1); } - iguana_ramchain_free(coin,&bp->ramchain,0); + iguana_ramchain_free(coin,&bp->ramchain,1); if ( iguana_bundlefname(coin,bp,fname) == 0 ) OS_removefile(fname,0); sprintf(fname,"%s/%s/spends/%s.%d",GLOBAL_DBDIR,coin->symbol,bits256_str(str,bp->hashes[0]),bp->bundleheight), OS_removefile(fname,0); @@ -2015,7 +2015,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru iguana_blockunmark(coin,block,bp,bundlei,1); //fprintf(stderr,"finished with hdrsi.%d ht.%d scripts.%u:%u\n",bp->hdrsi,bp->bundleheight,ramchain->H.scriptoffset,rdata->scriptspace); ramchain->H.ROflag = 0; - iguana_ramchain_free(coin,ramchain,0); + iguana_ramchain_free(coin,ramchain,1); return(fpos); } diff --git a/iguana/iguana_spendvectors.c b/iguana/iguana_spendvectors.c index 3c11f0d8f..2da4323c8 100755 --- a/iguana/iguana_spendvectors.c +++ b/iguana/iguana_spendvectors.c @@ -802,6 +802,7 @@ void iguana_initfinal(struct supernet_info *myinfo,struct iguana_info *coin,bits iguana_volatilesinit(myinfo,coin); iguana_savehdrs(coin); iguana_fastlink(coin,coin->balanceswritten * coin->chain->bundlesize - 1); + printf("walkchain\n"); iguana_walkchain(coin,0); hash2 = iguana_blockhash(coin,coin->balanceswritten * coin->chain->bundlesize); if ( bits256_nonz(hash2) != 0 && (block= iguana_blockfind("initfinal",coin,hash2)) != 0 )