Browse Source

Merge branch 'master' into release/v0.1

release/v0.1
jl777 8 years ago
parent
commit
3b4cc34af2
  1. 2
      iguana/coins/genblk
  2. 2
      iguana/coins/genbtc
  3. 4
      iguana/coins/genbtc.json
  4. 9
      iguana/confs/BLK_peers.txt
  5. 16
      iguana/iguana777.c
  6. 2
      iguana/iguana_chains.c
  7. 2
      includes/iguana_structs.h

2
iguana/coins/genblk

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"BLK\",\"name\":\"BlackCoin\",\"netmagic\":\"70352205\",\"p2p\":15714,\"rpc\":15715,\"pubval\":25,\"p2shval\":85,\"wifval\":153,\"txfee_satoshis\":\"10000\",\"minconfirms\":2,\"genesishash\":\"000001faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563\",\"genesis\":{\"hashalgo\":\"scrypt\",\"version\":1,\"timestamp\":1393221600,\"nBits\":\"1e0fffff\",\"nonce\":164482,\"merkle_root\":\"12630d16a97f24b287c8c2594dda5fb98c9e6c70fc61d44191931ea2aa08dc90\"},\"alertpubkey\":\"0486bce1bac0d543f104cbff2bd23680056a3b9ea05e1137d2ff90eeb5e08472eb500322593a2cb06fbf8297d7beb6cd30cb90f98153b5b7cce1493749e41e0284\",\"isPoS\":1}" curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"BLK\",\"name\":\"BlackCoin\",\"netmagic\":\"70352205\",\"p2p\":15714,\"rpc\":15715,\"pubval\":25,\"p2shval\":85,\"wifval\":153,\"txfee_satoshis\":\"10000\",\"minconfirms\":2,\"genesishash\":\"000001faef25dec4fbcf906e6242621df2c183bf232f263d0ba5b101911e4563\",\"genesis\":{\"hashalgo\":\"scrypt\",\"version\":1,\"timestamp\":1393221600,\"nBits\":\"1e0fffff\",\"nonce\":164482,\"merkle_root\":\"12630d16a97f24b287c8c2594dda5fb98c9e6c70fc61d44191931ea2aa08dc90\"},\"alertpubkey\":\"0486bce1bac0d543f104cbff2bd23680056a3b9ea05e1137d2ff90eeb5e08472eb500322593a2cb06fbf8297d7beb6cd30cb90f98153b5b7cce1493749e41e0284\",\"isPoS\":1,\"debug\":1}"

2
iguana/coins/genbtc

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":512,\"endpend\":512,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":8333}" curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":512,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":8333}"

4
iguana/coins/genbtc.json

@ -1 +1,5 @@
<<<<<<< HEAD
{"numhelpers":4,"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} {"numhelpers":4,"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}
=======
{"numhelpers":1,"prefetchlag":-1,"poll":1,"active":1,"agent":"iguana","method":"addcoin","newcoin":"BTC","startpend":64,"endpend":64,"services":129,"maxpeers":512,"RELAY":1,"VALIDATE":1,"portp2p":8333}
>>>>>>> master

9
iguana/confs/BLK_peers.txt

@ -0,0 +1,9 @@
188.112.70.36
1.34.180.245
104.131.248.191
104.174.97.3
104.204.109.11
106.68.86.178
108.174.171.46
108.219.100.78
112.198.64.34

16
iguana/iguana777.c

@ -328,8 +328,8 @@ int32_t iguana_emitfinished(struct supernet_info *myinfo,struct iguana_info *coi
{ {
if ( bp->emitfinish > 1 ) if ( bp->emitfinish > 1 )
n++; n++;
else if ( bp->emitfinish == 0 && bp->queued == 0 ) //else if ( bp->emitfinish == 0 && bp->queued == 0 )
iguana_bundleQ(myinfo,coin,bp,1000); // iguana_bundleQ(myinfo,coin,bp,1000);
} }
} }
return(n); return(n);
@ -340,7 +340,7 @@ int32_t iguana_utxofinished(struct iguana_info *coin)
struct iguana_bundle *bp; int32_t i,n = 0; struct iguana_bundle *bp; int32_t i,n = 0;
for (i=0; i<coin->bundlescount-1; i++) for (i=0; i<coin->bundlescount-1; i++)
{ {
if ( (bp= coin->bundles[i]) != 0 && bp->emitfinish > 1 ) if ( (bp= coin->bundles[i]) != 0 && bp->utxofinish > 1 )
n++; n++;
} }
return(n); return(n);
@ -391,14 +391,14 @@ int32_t iguana_helperA(struct supernet_info *myinfo,struct iguana_info *coin,int
if ( iguana_bundlevalidate(myinfo,coin,bp,0) == bp->n ) // if ( iguana_bundlevalidate(myinfo,coin,bp,0) == bp->n ) //
{ {
retval = 0; retval = 0;
if ( bp->emitfinish > 1 || (retval= iguana_spendvectors(myinfo,coin,bp,&bp->ramchain,0,bp->n,convertflag,0)) >= 0 ) if ( bp->utxofinish > 1 || (retval= iguana_spendvectors(myinfo,coin,bp,&bp->ramchain,0,bp->n,convertflag,0)) >= 0 )
{ {
if ( retval > 0 ) if ( retval > 0 )
{ {
printf("GENERATED UTXO.%d for ht.%d duration %d seconds\n",bp->hdrsi,bp->bundleheight,(uint32_t)time(NULL) - bp->startutxo); printf("GENERATED UTXO.%d for ht.%d duration %d seconds\n",bp->hdrsi,bp->bundleheight,(uint32_t)time(NULL) - bp->startutxo);
num++; num++;
} }
bp->emitfinish = (uint32_t)time(NULL); bp->utxofinish = (uint32_t)time(NULL);
} else printf("UTXO gen.[%d] utxo error\n",bp->hdrsi); } else printf("UTXO gen.[%d] utxo error\n",bp->hdrsi);
} }
else else
@ -440,7 +440,7 @@ void iguana_update_balances(struct iguana_info *coin)
return; return;
} }
max = coin->bundlescount; max = coin->bundlescount;
if ( coin->bundles[max-1] == coin->current || coin->bundles[max-1] == 0 || (coin->bundles[max-1] != 0 && coin->bundles[max-1]->emitfinish <= 1) ) if ( coin->bundles[max-1] == coin->current || coin->bundles[max-1] == 0 || (coin->bundles[max-1] != 0 && coin->bundles[max-1]->utxofinish <= 1) )
max--; max--;
//coin->spendvectorsaved = 0; //coin->spendvectorsaved = 0;
if ( iguana_balancefinished(coin) < max && iguana_spendvectorsaves(coin) == 0 ) // if ( iguana_balancefinished(coin) < max && iguana_spendvectorsaves(coin) == 0 ) //
@ -504,7 +504,7 @@ int32_t iguana_utxogen(struct supernet_info *myinfo,struct iguana_info *coin,int
} }
incr = IGUANA_NUMHELPERS; incr = IGUANA_NUMHELPERS;
max = coin->bundlescount; max = coin->bundlescount;
if ( coin->bundles[max-1] == coin->current || coin->bundles[max-1] == 0 || (coin->bundles[max-1] != 0 && coin->bundles[max-1]->emitfinish <= 1) ) if ( coin->bundles[max-1] == coin->current || coin->bundles[max-1] == 0 || (coin->bundles[max-1] != 0 && coin->bundles[max-1]->utxofinish <= 1) )
max--; max--;
printf("helperid.%d start %s utxogen bundlescount.%d max.%d\n",helperid,coin->symbol,coin->bundlescount,max); printf("helperid.%d start %s utxogen bundlescount.%d max.%d\n",helperid,coin->symbol,coin->bundlescount,max);
if ( helperid < incr ) if ( helperid < incr )
@ -710,7 +710,7 @@ void iguana_helper(void *arg)
{ {
if ( (bp= coin->bundles[j]) != 0 ) if ( (bp= coin->bundles[j]) != 0 )
{ {
if ( bp->startutxo == 0 && bp->numsaved >= coin->chain->bundlesize && iguana_bundleready(myinfo,coin,bp,0) == bp->n ) if ( bp->emitfinish == 0 && bp->numsaved >= coin->chain->bundlesize && iguana_bundleready(myinfo,coin,bp,0) == bp->n )
iguana_bundlefinalize(myinfo,coin,bp,&MEM,MEMB); iguana_bundlefinalize(myinfo,coin,bp,&MEM,MEMB);
if ( 0 && bp->emitfinish != 0 && time(NULL) > bp->emitfinish+60 ) if ( 0 && bp->emitfinish != 0 && time(NULL) > bp->emitfinish+60 )
{ {

2
iguana/iguana_chains.c

@ -125,7 +125,7 @@ int32_t blockhash_scrypt(uint8_t *blockhashp,uint8_t *serialized,int32_t len)
blockhashfunc iguana_hashalgo(char *hashalgostr) blockhashfunc iguana_hashalgo(char *hashalgostr)
{ {
return(blockhash_sha256); // all coins seem to use this for the actual blockchain data //return(blockhash_sha256);
if ( hashalgostr == 0 || hashalgostr[0] == 0 || strcmp(hashalgostr,"sha256") == 0 ) if ( hashalgostr == 0 || hashalgostr[0] == 0 || strcmp(hashalgostr,"sha256") == 0 )
return(blockhash_sha256); return(blockhash_sha256);
else if ( strcmp(hashalgostr,"scrypt") == 0 ) else if ( strcmp(hashalgostr,"scrypt") == 0 )

2
includes/iguana_structs.h

@ -374,7 +374,7 @@ struct iguana_bundle
{ {
struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp; struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp;
struct iguana_bloom16 bloom; int64_t totaldurations,duplicatedurations; int32_t durationscount,duplicatescount; struct iguana_bloom16 bloom; int64_t totaldurations,duplicatedurations; int32_t durationscount,duplicatescount;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,lastRT,missingstime,unsticktime,converted; uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,lastRT,missingstime,unsticktime,converted,utxofinish;
int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings,numissued,Xvalid; int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings,numissued,Xvalid;
int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec,isRT; int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec,isRT;
double avetime,threshold,metric; uint64_t datasize,estsize; double avetime,threshold,metric; uint64_t datasize,estsize;

Loading…
Cancel
Save