Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
07a64c7d09
  1. 2
      basilisk/basilisk.c
  2. 4
      basilisk/basilisk_MSG.c
  3. 4
      iguana/iguana_ramchain.c
  4. 1
      iguana/iguana_spendvectors.c

2
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);
}
}

4
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 )

4
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; i<bp->n; 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);
}

1
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 )

Loading…
Cancel
Save