From dbbe7805b836386da7276288a93a401d2c3f1225 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Feb 2017 18:04:15 +0200 Subject: [PATCH] test --- basilisk/basilisk.c | 2 -- iguana/dpow/dpow_network.c | 12 +++++++++++- iguana/iguana777.h | 2 +- iguana/main.c | 2 ++ iguana/tests/KMD.batch11 | 1 + iguana/tests/dexlistunspent | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 823656011..1ea4ac20d 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -919,8 +919,6 @@ void basilisks_loop(void *arg) endmilli = startmilli + 500; else endmilli = startmilli + 1000; } - if ( myinfo->DEXEXPLORER != 0 ) - kmd_bitcoinscan(); if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) ) { //fprintf(stderr,"H "); diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 2239bc977..d9eeb35af 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -399,7 +399,7 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *key,int32 printf("%d: subscribe connect (%s)\n",myinfo->numdexipbits,str); } } - if ( (rand() % 100) < 40 ) + if ( 0 && (rand() % 100) < 40 ) { nanomsg_tcpname(0,str,ipaddr,REP_SOCK); nn_connect(myinfo->reqsock,str); @@ -882,6 +882,16 @@ char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol) decode_hex(myinfo->notaries[i],33,pubkeystr); } } + else + { + extern const char *Notaries_elected[][2]; + myinfo->numnotaries = 64;//sizeof(Notaries_elected)/sizeof(*Notaries_elected); + for (i=0; inumnotaries; i++) + { + decode_hex(myinfo->notaries[i],33,(char *)Notaries_elected[i][1]); + } + printf("default to elected.%d\n",myinfo->numnotaries); + } free_json(retjson); } } diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 29fa7195c..471fa8187 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -133,7 +133,7 @@ struct supernet_info struct liquidity_info linfos[512]; cJSON *liquidity_currencies; struct pending_trade *trades; portable_mutex_t pending_mutex; struct komodo_notaries NOTARY; char seedipaddr[64]; uint32_t dpowipbits[128]; int32_t numdpowipbits; portable_mutex_t notarymutex,dpowmutex; - char dexseed_ipaddrs[2][64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex; + char dexseed_ipaddrs[1][64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex; // compatibility bits256 pangea_category,instantdex_category; uint8_t logs[256],exps[510]; diff --git a/iguana/main.c b/iguana/main.c index be3cebe4a..c0d231e3b 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -484,6 +484,8 @@ void mainloop(struct supernet_info *myinfo) } usleep(30000); } + if ( myinfo->DEXEXPLORER != 0 ) + kmd_bitcoinscan(); //pangea_queues(SuperNET_MYINFO(0)); //if ( flag == 0 ) // usleep(100000 + isRT*100000 + (numpeers == 0)*1000000); diff --git a/iguana/tests/KMD.batch11 b/iguana/tests/KMD.batch11 index 0bc901b56..c427e01db 100755 --- a/iguana/tests/KMD.batch11 +++ b/iguana/tests/KMD.batch11 @@ -1,3 +1,4 @@ +sleep 99999 # RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295 ./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 42.40642295 sleep 3 diff --git a/iguana/tests/dexlistunspent b/iguana/tests/dexlistunspent index e262df7f3..5cd82cdaa 100755 --- a/iguana/tests/dexlistunspent +++ b/iguana/tests/dexlistunspent @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"19rjYdJtRN3qoammX3r1gxy9bvh8p8DmRc\",\"symbol\":\"BTC\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent2\",\"address\":\"RDKb3QykRJNfLKWLcbbv9z7xqbtxwB54GC\",\"symbol\":\"KMD\"}"