Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0cbc30cc89
  1. 4
      iguana/iguana777.h
  2. 4
      iguana/iguana_ramchain.c
  3. 7
      iguana/iguana_recv.c
  4. 2
      iguana/main.c

4
iguana/iguana777.h

@ -33,9 +33,9 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEIGHT 200
#define IGUANA_MAXPENDHDRS 1
#define _IGUANA_MAXPENDING 8 //64
#define _IGUANA_MAXPENDING 1024 //64
#define _IGUANA_MAXBUNDLES 8
#define IGUANA_BUNDLELOOP 7
#define IGUANA_BUNDLELOOP 100
#define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

4
iguana/iguana_ramchain.c

@ -1954,10 +1954,10 @@ int32_t iguana_ramchain_scriptspace(struct iguana_info *coin,int32_t *sigspacep,
}
}
}
scriptspace += tx->numvins * 16 + 65536; // for metascripts
scriptspace += tx->numvins * 16 + 16384; // for metascripts
}
*sigspacep = sigspace, *pubkeyspacep = pubkeyspace;
printf("numvouts.%d numvins.%d scriptspace.%d p2shspace.%d sigspace.%d pubkeyspace.%d\n",tx->numvouts,tx->numvins,scriptspace,p2shspace,sigspace,pubkeyspace);
//printf("numvouts.%d numvins.%d scriptspace.%d p2shspace.%d sigspace.%d pubkeyspace.%d\n",tx->numvouts,tx->numvins,scriptspace,p2shspace,sigspace,pubkeyspace);
return(scriptspace + p2shspace);
}

7
iguana/iguana_recv.c

@ -365,6 +365,11 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_bundleQ(coin,bp,bp->n*5);
return(0);
}
if ( bp->rank == 0 || bp->rank > coin->peers.numranked )
{
iguana_bundleQ(coin,bp,((bp->rank != 0) ? bp->rank : 64) * 1000);
return(0);
}
pend = queue_size(&coin->priorityQ) + queue_size(&coin->blocksQ);
for (i=0; i<IGUANA_MAXPEERS; i++)
pend += coin->peers.active[i].pendblocks;
@ -416,7 +421,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
}
width = 1000 + sqrt(sqrt(bp->n * (1+bp->numsaved+issued)) * (10+coin->bundlescount-bp->hdrsi));
if ( 1 && counter > 0 && bp->rank <= coin->peers.numranked )
printf("ITERATE bundle.%d h.%d n.%d r.%d s.%d F.%d I.%d T.%d %f %u next %f\n",bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,issued,timelimit,endmillis-OS_milliseconds(),(uint32_t)time(NULL),width);
printf("ITERATE.%d bundle.%d h.%d n.%d r.%d s.%d F.%d I.%d T.%d %f %u next %f\n",bp->rank,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,issued,timelimit,endmillis-OS_milliseconds(),(uint32_t)time(NULL),width);
if ( bp->emitfinish == 0 )
{
if ( bp->numsaved >= bp->n )

2
iguana/main.c

@ -1118,7 +1118,7 @@ void iguana_main(void *arg)
sleep(1);
char *str;
//iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}"));
if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":128,\"maxpeers\":128,\"newcoin\":\"BTCD\",\"active\":1}"),0)) != 0 )
if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":128,\"maxpeers\":128,\"newcoin\":\"BTC\",\"active\":1}"),0)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":128,\"maxpeers\":128,\"newcoin\":\"BTCD\",\"active\":1}"),0)) != 0 )

Loading…
Cancel
Save