Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
ff4c2c869a
  1. 1
      iguana/coins/gensxc
  2. 11
      iguana/confs/SXC_peers.txt
  3. 2
      iguana/iguana_msg.c
  4. 4
      iguana/iguana_peers.c
  5. 2
      iguana/iguana_recv.c
  6. 4
      iguana/pangea777.h

1
iguana/coins/gensxc

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"protover\":60002,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"SXC\",\"name\":\"Sexcoin\",\"netmagic\":\"fbc0b6db\",\"p2p\":16814,\"rpc\":31812,\"pubval\":62,\"p2shval\":5,\"txfee_satoshis\":\"10000000\",\"minconfirms\":2,\"genesishash\":\"f42b9553085a1af63d659d3907a42c3a0052bbfa2693d3acf990af85755f2279\",\"genesis\":{\"version\":1,\"timestamp\":1369146359,\"nBits\":\"1e7fffff\",\"nonce\":244086,\"merkle_root\":\"661de12dc8dd26989adb169733b5a99150d52b8b6e8332976277856e246101f4\"},\"alertpubkey\":\"04a5814813115273a109cff99907ba4a05d951873dae7acb6c973d0c9e7c88911a3dbc9aa600deac241b91707e7b4ffb30ad91c8e56e695a1ddf318592988afe0a\",\"isPoS\":1}"

11
iguana/confs/SXC_peers.txt

@ -0,0 +1,11 @@
104.238.221.17:16814
148.163.102.28:16814
167.160.36.152:16814
192.227.158.136:16814
213.46.197.237:16814
87.204.149.94:16814
45.43.26.103:16814
172.110.18.177:16814
172.110.18.178:16814
185.116.238.204:16814
84.242.207.225:16814

2
iguana/iguana_msg.c

@ -890,7 +890,7 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s
} }
if ( addr != 0 ) if ( addr != 0 )
{ {
if ( 0 && addr->msgcounts.verack == 0 ) //if ( 0 && addr->msgcounts.verack == 0 )
printf("iguana_msgparser verack.%d from (%s) parse.(%s) len.%d\n",addr->msgcounts.verack,addr->ipaddr,H->command,recvlen); printf("iguana_msgparser verack.%d from (%s) parse.(%s) len.%d\n",addr->msgcounts.verack,addr->ipaddr,H->command,recvlen);
//iguana_peerblockrequest(coin,addr->blockspace,IGUANA_MAXPACKETSIZE,addr,iguana_blockhash(coin,100),0); //iguana_peerblockrequest(coin,addr->blockspace,IGUANA_MAXPACKETSIZE,addr,iguana_blockhash(coin,100),0);
addr->lastcontact = (uint32_t)time(NULL); addr->lastcontact = (uint32_t)time(NULL);

4
iguana/iguana_peers.c

@ -517,7 +517,7 @@ int32_t iguana_send(struct iguana_info *coin,struct iguana_peer *addr,uint8_t *s
} }
} }
addr->totalsent += len; addr->totalsent += len;
if ( 0 && addr->basilisk != 0 ) //if ( 0 && addr->basilisk != 0 )
printf("verack.%d (%s) sent.%d bytes to %s\n",addr->msgcounts.verack,cmdstr,len,addr->ipaddr); printf("verack.%d (%s) sent.%d bytes to %s\n",addr->msgcounts.verack,cmdstr,len,addr->ipaddr);
return(len); return(len);
} }
@ -573,7 +573,7 @@ int32_t iguana_recv(char *ipaddr,int32_t usock,uint8_t *recvbuf,int32_t len)
remains -= recvlen; remains -= recvlen;
//int32_t i; for (i=0; i<recvlen; i++) //int32_t i; for (i=0; i<recvlen; i++)
// printf("%02x",recvbuf[i]); // printf("%02x",recvbuf[i]);
//printf("got %d remains.%d of total.%d from (%s)\n",recvlen,remains,len,ipaddr); printf("got %d remains.%d of total.%d from (%s)\n",recvlen,remains,len,ipaddr);
recvbuf = &recvbuf[recvlen]; recvbuf = &recvbuf[recvlen];
} else usleep(10000); } else usleep(10000);
} }

2
iguana/iguana_recv.c

@ -2198,7 +2198,7 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
int32_t newhwm = 0,hwmheight,flag = 0; char str[2000]; int32_t newhwm = 0,hwmheight,flag = 0; char str[2000];
hwmheight = coin->blocks.hwmchain.height; hwmheight = coin->blocks.hwmchain.height;
coin->RTramchain_busy = 1; coin->RTramchain_busy = 1;
if ( coin->balanceflush != 0 ) if ( coin->balanceflush != 0 && coin->longestchain > coin->chain->bundlesize )
{ {
fprintf(stderr,"%s call balanceflush\n",coin->symbol); fprintf(stderr,"%s call balanceflush\n",coin->symbol);
//portable_mutex_lock(&coin->RTmutex); //portable_mutex_lock(&coin->RTmutex);

4
iguana/pangea777.h

@ -123,12 +123,12 @@ int32_t init_sharenrs(unsigned char sharenrs[255],unsigned char *orig,int32_t m,
struct pangea_msghdr struct pangea_msghdr
{ {
// sig { bits256 sigbits,pubkey; uint64_t signer64bits; uint32_t timestamp,allocsize; }; // sig { bits256 sigbits,pubkey; uint64_t signer64bits; uint32_t timestamp,allocsize; };
struct acct777_sig sig __attribute__((packed)); struct acct777_sig sig PACKED;
bits256 tablehash; bits256 tablehash;
char cmd[8]; char cmd[8];
int8_t turni,cardi,destplayer,myind; // ALL DATA MUST BE SERIALIZED!!! int8_t turni,cardi,destplayer,myind; // ALL DATA MUST BE SERIALIZED!!!
uint8_t serialized[]; uint8_t serialized[];
} __attribute__((packed)); } PACKED;
#define PANGEA_ARGS struct supernet_info *myinfo,struct table_info *tp,cJSON *json #define PANGEA_ARGS struct supernet_info *myinfo,struct table_info *tp,cJSON *json
#define PANGEA_CALLARGS myinfo,tp,json #define PANGEA_CALLARGS myinfo,tp,json

Loading…
Cancel
Save