Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
65d7bcc12c
  1. 2
      README.md
  2. 8
      iguana/iguana777.c
  3. 1
      iguana/iguana777.h
  4. 2
      iguana/main.c

2
README.md

@ -4,7 +4,7 @@
> #TL;DR#
>
> ```sudo apt-get update; sudo apt-get install build-essentials libcurl4-gnutls-dev autotools-dev autoconf libgmp3-dev libssl-dev libgmp3-dev; git clone https://github.com/jl777/SuperNET; cd SuperNET; ./m_onetime m_unix; ./m_unix; agents/iguana```
> ```sudo apt-get update; sudo apt-get install build-essential libcurl4-gnutls-dev autotools-dev autoconf libgmp3-dev libssl-dev libgmp3-dev; git clone https://github.com/jl777/SuperNET; cd SuperNET; ./m_onetime m_unix; ./m_unix; agents/iguana```
>
> The above one line gets SuperNET installed, built and launched for unix.
>

8
iguana/iguana777.c

@ -607,9 +607,9 @@ void iguana_coinloop(void *arg)
}
if ( flag == 0 && coin->isRT == 0 )
usleep(coin->polltimeout*1000 + (coin->peers.numranked == 0)*1000000);
else if ( coin->RTheight >= coin->longestchain-3 )
usleep(coin->polltimeout*1000 + coin->isRT*90000 + (coin->peers.numranked == 0)*1000000);
else usleep(25000);
else if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize )
usleep(coin->polltimeout*1000 + 90000 + (coin->peers.numranked == 0)*1000000);
else usleep(coin->polltimeout*1000);
}
}
@ -672,7 +672,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
if ( jobj(json,"cache") != 0 )
coin->enableCACHE = juint(json,"cache");
if ( (coin->polltimeout= juint(json,"poll")) <= 0 )
coin->polltimeout = 10;
coin->polltimeout = IGUANA_DEFAULT_POLLTIMEOUT;
coin->active = juint(json,"active");
if ( (coin->minconfirms = minconfirms) == 0 )
coin->minconfirms = (strcmp(symbol,"BTC") == 0) ? 3 : 10;

1
iguana/iguana777.h

@ -31,6 +31,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_MAXCOINS 64
#define IGUANA_MAXDELAY_MILLIS (3600 * 1000)
#define IGUANA_DEFAULT_POLLTIMEOUT 10
#define IGUANA_EXCHANGEIDLE 10
#define IGUANS_JSMILLIS 100

2
iguana/main.c

@ -1243,7 +1243,7 @@ void iguana_main(void *arg)
if ( 1 )
{
sleep(1);
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":256,\"endpend\":256,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":1}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"VALIDATE\":1,\"prefetchlag\":13,\"startpend\":256,\"endpend\":256,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":0,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":8,\"poll\":10}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0,myinfo->rpcport)) != 0 )

Loading…
Cancel
Save