From ff4c2c869a7aada421a9f90d007dc9083eee902c Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Sep 2016 18:27:25 -0300 Subject: [PATCH] test --- iguana/coins/gensxc | 1 + iguana/confs/SXC_peers.txt | 11 +++++++++++ iguana/iguana_msg.c | 2 +- iguana/iguana_peers.c | 4 ++-- iguana/iguana_recv.c | 2 +- iguana/pangea777.h | 4 ++-- 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100755 iguana/coins/gensxc create mode 100644 iguana/confs/SXC_peers.txt diff --git a/iguana/coins/gensxc b/iguana/coins/gensxc new file mode 100755 index 000000000..71100684d --- /dev/null +++ b/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}" diff --git a/iguana/confs/SXC_peers.txt b/iguana/confs/SXC_peers.txt new file mode 100644 index 000000000..30a2a2bc4 --- /dev/null +++ b/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 diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index 7597cec54..1c597e573 100755 --- a/iguana/iguana_msg.c +++ b/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 ( 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); //iguana_peerblockrequest(coin,addr->blockspace,IGUANA_MAXPACKETSIZE,addr,iguana_blockhash(coin,100),0); addr->lastcontact = (uint32_t)time(NULL); diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 40f3c5292..775c16bd5 100755 --- a/iguana/iguana_peers.c +++ b/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; - 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); return(len); } @@ -573,7 +573,7 @@ int32_t iguana_recv(char *ipaddr,int32_t usock,uint8_t *recvbuf,int32_t len) remains -= recvlen; //int32_t i; for (i=0; iblocks.hwmchain.height; 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); //portable_mutex_lock(&coin->RTmutex); diff --git a/iguana/pangea777.h b/iguana/pangea777.h index 56a71e57b..731531f84 100755 --- a/iguana/pangea777.h +++ b/iguana/pangea777.h @@ -123,12 +123,12 @@ int32_t init_sharenrs(unsigned char sharenrs[255],unsigned char *orig,int32_t m, struct pangea_msghdr { // sig { bits256 sigbits,pubkey; uint64_t signer64bits; uint32_t timestamp,allocsize; }; - struct acct777_sig sig __attribute__((packed)); + struct acct777_sig sig PACKED; bits256 tablehash; char cmd[8]; int8_t turni,cardi,destplayer,myind; // ALL DATA MUST BE SERIALIZED!!! uint8_t serialized[]; -} __attribute__((packed)); +} PACKED; #define PANGEA_ARGS struct supernet_info *myinfo,struct table_info *tp,cJSON *json #define PANGEA_CALLARGS myinfo,tp,json