Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ff461e8ad8
  1. 2
      iguana/iguana777.c
  2. 4
      iguana/iguana_peers.c
  3. 5
      iguana/iguana_unspents.c
  4. 2
      iguana/main.c

2
iguana/iguana777.c

@ -464,7 +464,7 @@ void iguana_coinloop(void *arg)
} }
if ( coin->bindsock >= 0 ) if ( coin->bindsock >= 0 )
{ {
if ( coin->peers.numranked < 8 && now > coin->lastpossible+60 ) if ( coin->peers.numranked < coin->MAXPEERS/2 && now > coin->lastpossible )
{ {
//fprintf(stderr,"possible\n"); //fprintf(stderr,"possible\n");
coin->lastpossible = iguana_possible_peer(coin,0); // tries to connect to new peers coin->lastpossible = iguana_possible_peer(coin,0); // tries to connect to new peers

4
iguana/iguana_peers.c

@ -745,12 +745,12 @@ uint32_t iguana_possible_peer(struct iguana_info *coin,char *ipaddr)
return((uint32_t)time(NULL)); return((uint32_t)time(NULL));
} }
#endif #endif
printf("check possible peer.(%s)\n",ipaddr); //printf("check possible peer.(%s)\n",ipaddr);
for (i=n=0; i<coin->MAXPEERS; i++) for (i=n=0; i<coin->MAXPEERS; i++)
{ {
if ( strcmp(ipaddr,coin->peers.active[i].ipaddr) == 0 ) if ( strcmp(ipaddr,coin->peers.active[i].ipaddr) == 0 )
{ {
printf("(%s) already active\n",ipaddr); //printf("(%s) already active\n",ipaddr);
free_queueitem(ipaddr); free_queueitem(ipaddr);
return((uint32_t)time(NULL)); return((uint32_t)time(NULL));
} }

5
iguana/iguana_unspents.c

@ -813,9 +813,12 @@ void iguana_RTramchainfree(struct iguana_info *coin)
void iguana_RTramchainalloc(struct iguana_info *coin,struct iguana_bundle *bp) void iguana_RTramchainalloc(struct iguana_info *coin,struct iguana_bundle *bp)
{ {
struct iguana_ramchain *dest = &coin->RTramchain; int32_t mult; struct iguana_ramchain *dest = &coin->RTramchain;
if ( coin->RTramchain.H.data == 0 ) if ( coin->RTramchain.H.data == 0 )
{ {
mult = (strcmp("BTC",coin->symbol) == 0) ? 2048 : 4;
if ( coin->RTmem.ptr == 0 )
iguana_meminit(&coin->RTmem,coin->symbol,0,IGUANA_MAXPACKETSIZE*mult + 65536*3,0);
iguana_ramchainopen(coin,dest,&coin->RTmem,&coin->RThashmem,bp->bundleheight,bp->hashes[0]); iguana_ramchainopen(coin,dest,&coin->RTmem,&coin->RThashmem,bp->bundleheight,bp->hashes[0]);
dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti; dest->H.txidind = dest->H.unspentind = dest->H.spendind = dest->pkind = dest->H.data->firsti;
dest->externalind = dest->H.stacksize = 0; dest->externalind = dest->H.stacksize = 0;

2
iguana/main.c

@ -1128,7 +1128,7 @@ void iguana_main(void *arg)
sleep(1); sleep(1);
char *str; char *str;
//iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}")); //iguana_launchcoin(MYINFO.rpcsymbol,cJSON_Parse("{}"));
if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":512,\"endpend\":512,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":128,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0)) != 0 ) if ( 1 && (str= SuperNET_JSON(&MYINFO,cJSON_Parse("{\"startpend\":512,\"endpend\":512,\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":129,\"maxpeers\":512,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0)) != 0 )
{ {
free(str); 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)) != 0 ) 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)) != 0 )

Loading…
Cancel
Save