From f910bd4b1c3187145a213d7c27f8ad4e2b6a099b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Dec 2016 15:26:24 -0300 Subject: [PATCH 1/4] test --- iguana/dPoW.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 3df3f0601..8572f2393 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -19,10 +19,10 @@ #define DPOW_FIRSTRATIFY 1000 #define DPOW_CHECKPOINTFREQ 10 -#define DPOW_MINSIGS 13 //((height < 90000) ? 7 : 11) +#define DPOW_MINSIGS 17 //((height < 90000) ? 7 : 11) //#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1) #define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries) -#define DPOW_VERSION 0x0770 +#define DPOW_VERSION 0x0771 #define DPOW_UTXOSIZE 10000 #define DPOW_MINOUTPUT 6000 #define DPOW_DURATION 300 From d1235459e2bea0465493ea579abb35fb8b7a22d7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Dec 2016 16:56:27 -0300 Subject: [PATCH 2/4] test --- iguana/main.c | 3 +-- includes/iguana_funcs.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/main.c b/iguana/main.c index f855318c9..43d8cfd50 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1587,8 +1587,6 @@ void iguana_main(void *arg) libgfshare_init(myinfo,myinfo->logs,myinfo->exps); myinfo->rpcport = IGUANA_RPCPORT; myinfo->dpowsock = myinfo->dexsock = myinfo->pubsock = myinfo->subsock = myinfo->reqsock = myinfo->repsock = -1; -//myinfo->rpcport = IGUANA_NOTARYPORT; -//myinfo->IAMNOTARY = 1; if ( arg != 0 ) { if ( strcmp((char *)arg,"OStests") == 0 ) @@ -1597,6 +1595,7 @@ void iguana_main(void *arg) { myinfo->rpcport = IGUANA_NOTARYPORT; myinfo->IAMNOTARY = 1; + dex_init(myinfo); } } #ifdef IGUANA_OSTESTS diff --git a/includes/iguana_funcs.h b/includes/iguana_funcs.h index 96972ebdb..10a2de86b 100755 --- a/includes/iguana_funcs.h +++ b/includes/iguana_funcs.h @@ -259,6 +259,7 @@ struct iguana_waddress *iguana_waccountadd(struct supernet_info *myinfo,struct i struct iguana_waddress *iguana_waccountswitch(struct supernet_info *myinfo,struct iguana_info *coin,char *account,char *coinaddr,char *redeemScript); struct iguana_waddress *iguana_waddresscalc(struct supernet_info *myinfo,uint8_t pubval,uint8_t wiftype,struct iguana_waddress *addr,bits256 privkey); struct iguana_waddress *iguana_waddressfind(struct supernet_info *myinfo,struct iguana_waccount *wacct,char *coinaddr); +void dex_init(struct supernet_info *myinfo); char *iguana_coinjson(struct iguana_info *coin,char *method,cJSON *json); cJSON *iguana_peersjson(struct iguana_info *coin,int32_t addronly); //int32_t btc_priv2wif(char *wifstr,uint8_t privkey[32],uint8_t addrtype); From beaf395f4733e092b9f3971831994701bdeda434 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Dec 2016 17:09:18 -0300 Subject: [PATCH 3/4] test --- iguana/dpow/dpow_network.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 5c0264ad8..9c474c471 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -81,6 +81,7 @@ void dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen) nn_setsockopt(myinfo->reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(myinfo->subsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(myinfo->subsock,NN_SUB,NN_SUB_SUBSCRIBE,"",0); + printf("DEXINIT req.%d sub.%d\n",myinfo->reqsock,myinfo->subsock); } } } @@ -317,6 +318,7 @@ void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr) nn_setsockopt(myinfo->dpowsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(myinfo->dexsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(myinfo->repsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); + printf("DEXINIT dex.%d rep.%d\n",myinfo->dexsock,myinfo->repsock); } } } @@ -748,6 +750,7 @@ void dpow_nanomsg_update(struct supernet_info *myinfo) dpow_nanoutxoget(myinfo,dp,bp,&np->notarize,0,np->senderind); else dpow_nanoutxoget(myinfo,dp,bp,&np->ratify,1,np->senderind); dpow_datahandler(myinfo,dp,bp,np->senderind,np->channel,np->height,np->packet,np->datalen); + dex_reqsend(myinfo,np->packet,np->datalen); } } //dp->crcs[firstz] = crc32; From 4a59d261c6d058301aabc97210639df3d974e206 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Dec 2016 18:48:39 -0300 Subject: [PATCH 4/4] test --- iguana/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/main.c b/iguana/main.c index 43d8cfd50..c98c8497d 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1595,7 +1595,7 @@ void iguana_main(void *arg) { myinfo->rpcport = IGUANA_NOTARYPORT; myinfo->IAMNOTARY = 1; - dex_init(myinfo); + //dex_init(myinfo); } } #ifdef IGUANA_OSTESTS