From 7acc99a3c02bb5782c644ef785abf5b7c89ccacf Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 8 Nov 2017 22:35:42 +0200 Subject: [PATCH 1/6] Test --- iguana/exchanges/LP_nativeDEX.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index feb20b763..51c32dac8 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -93,7 +93,8 @@ char LP_myipaddr[64],LP_publicaddr[64],USERHOME[512] = { "/root" }; char LP_gui[16] = { "cli" }; char *default_LPnodes[] = { "5.9.253.195", "5.9.253.196", "5.9.253.197", "5.9.253.198", "5.9.253.199", "5.9.253.200", "5.9.253.201", "5.9.253.202", "5.9.253.203", - "24.54.206.138", "173.212.225.176", "136.243.45.140", "107.72.162.127", "72.50.16.86", "51.15.202.191", "173.228.198.88", + "51.15.86.136", + //"24.54.206.138", "173.212.225.176", "136.243.45.140", "107.72.162.127", "72.50.16.86", "51.15.202.191", "173.228.198.88", //"51.15.203.171", "51.15.86.136", "51.15.94.249", "51.15.80.18", "51.15.91.40", "51.15.54.2", "51.15.86.31", "51.15.82.29", "51.15.89.155", };//"5.9.253.204" }; // @@ -734,7 +735,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint } if ( seednode == 0 || seednode[0] == 0 ) { - LP_addpeer(mypeer,pubsock,"5.9.253.195",myport,pushport,subport,0,G.LP_sessionid); + LP_addpeer(mypeer,pubsock,"51.15.86.136",myport,pushport,subport,0,G.LP_sessionid); OS_randombytes((void *)&r,sizeof(r)); for (j=0; j Date: Wed, 8 Nov 2017 22:36:06 +0200 Subject: [PATCH 2/6] Test --- iguana/exchanges/LP_signatures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index e28a1974f..5c5ffdab4 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -585,7 +585,7 @@ char *LP_notify_recv(cJSON *argjson) LP_pubkey_sigcheck(pubp,argjson); if ( (ipaddr= jstr(argjson,"isLP")) != 0 ) { - //printf("notify from isLP %s\n",ipaddr); + printf("notify from isLP %s\n",ipaddr); LP_addpeer(LP_mypeer,LP_mypubsock,ipaddr,RPC_port,RPC_port+10,RPC_port+20,1,juint(argjson,"session")); } //char str[65]; printf("%.3f NOTIFIED pub %s rmd160 %s\n",OS_milliseconds()-millis,bits256_str(str,pub),rmd160str); From 4f5e48ac87d525d9e8019787ed55b17ede1a081b Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 8 Nov 2017 22:43:03 +0200 Subject: [PATCH 3/6] Test --- iguana/exchanges/LP_nativeDEX.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 51c32dac8..cc9d7d69a 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -93,9 +93,8 @@ char LP_myipaddr[64],LP_publicaddr[64],USERHOME[512] = { "/root" }; char LP_gui[16] = { "cli" }; char *default_LPnodes[] = { "5.9.253.195", "5.9.253.196", "5.9.253.197", "5.9.253.198", "5.9.253.199", "5.9.253.200", "5.9.253.201", "5.9.253.202", "5.9.253.203", - "51.15.86.136", //"24.54.206.138", "173.212.225.176", "136.243.45.140", "107.72.162.127", "72.50.16.86", "51.15.202.191", "173.228.198.88", - //"51.15.203.171", "51.15.86.136", "51.15.94.249", "51.15.80.18", "51.15.91.40", "51.15.54.2", "51.15.86.31", "51.15.82.29", "51.15.89.155", + "51.15.203.171", "51.15.86.136", "51.15.94.249", "51.15.80.18", "51.15.91.40", "51.15.54.2", "51.15.86.31", "51.15.82.29", "51.15.89.155", };//"5.9.253.204" }; // From bcdbcd121c1a570cc7c613e7df756271912e53b0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 8 Nov 2017 22:53:13 +0200 Subject: [PATCH 4/6] Test --- iguana/exchanges/LP_nativeDEX.c | 2 ++ iguana/exchanges/LP_signatures.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index cc9d7d69a..a0dbe10bf 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -18,6 +18,8 @@ // LP_nativeDEX.c // marketmaker // +// dynamic adding of new LP node +// withdraw too big // bot status 1600% ? // BCH signing // dPoW security -> 4: KMD notarized, 5: BTC notarized, after next notary elections diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index 5c5ffdab4..e28a1974f 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -585,7 +585,7 @@ char *LP_notify_recv(cJSON *argjson) LP_pubkey_sigcheck(pubp,argjson); if ( (ipaddr= jstr(argjson,"isLP")) != 0 ) { - printf("notify from isLP %s\n",ipaddr); + //printf("notify from isLP %s\n",ipaddr); LP_addpeer(LP_mypeer,LP_mypubsock,ipaddr,RPC_port,RPC_port+10,RPC_port+20,1,juint(argjson,"session")); } //char str[65]; printf("%.3f NOTIFIED pub %s rmd160 %s\n",OS_milliseconds()-millis,bits256_str(str,pub),rmd160str); From 7b8cb29c9414e89e12c3d89505bddd7fa48586da Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 9 Nov 2017 02:17:21 +0200 Subject: [PATCH 5/6] Test --- iguana/exchanges/LP_nativeDEX.c | 2 ++ iguana/exchanges/LP_remember.c | 1 + iguana/exchanges/LP_socket.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index a0dbe10bf..15d76c144 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -19,6 +19,8 @@ // marketmaker // // dynamic adding of new LP node +// swap started event for bot +// lack of full depth // withdraw too big // bot status 1600% ? // BCH signing diff --git a/iguana/exchanges/LP_remember.c b/iguana/exchanges/LP_remember.c index 927af1771..f26467d3e 100644 --- a/iguana/exchanges/LP_remember.c +++ b/iguana/exchanges/LP_remember.c @@ -1115,6 +1115,7 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti if ( (fp= fopen(fname,"wb")) != 0 ) { jaddstr(item,"method","tradestatus"); + jaddstr(item,"gui",G.gui); itemstr = jprint(item,0); fprintf(fp,"%s\n",itemstr); LP_tradecommand_log(item); diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 69c79217c..9e8b9bbb8 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -1049,8 +1049,8 @@ cJSON *LP_electrumserver(struct iguana_info *coin,char *ipaddr,uint16_t port) struct electrum_info *ep; int32_t kickval,already; cJSON *retjson; if ( ipaddr == 0 || ipaddr[0] == 0 || port == 0 ) { - //coin->electrum = 0; - printf("would have disabled %s electrum here\n",coin->symbol); + coin->electrum = 0; + //printf("would have disabled %s electrum here\n",coin->symbol); return(cJSON_Parse("{\"result\":\"success\",\"status\":\"electrum mode disabled, now in native coin mode\"}")); } retjson = cJSON_CreateObject(); From 94dc2faa0a93e7837c3a81845c6697a3781e5f05 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 9 Nov 2017 10:33:52 +0200 Subject: [PATCH 6/6] Test --- iguana/exchanges/LP_nativeDEX.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 15d76c144..5fdaad251 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -19,6 +19,7 @@ // marketmaker // // dynamic adding of new LP node +// BTC swaps // swap started event for bot // lack of full depth // withdraw too big @@ -740,6 +741,7 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint { LP_addpeer(mypeer,pubsock,"51.15.86.136",myport,pushport,subport,0,G.LP_sessionid); OS_randombytes((void *)&r,sizeof(r)); + r = 0; for (j=0; j