Browse Source

test

etomic
jl777 8 years ago
parent
commit
dbbe7805b8
  1. 2
      basilisk/basilisk.c
  2. 12
      iguana/dpow/dpow_network.c
  3. 2
      iguana/iguana777.h
  4. 2
      iguana/main.c
  5. 1
      iguana/tests/KMD.batch11
  6. 2
      iguana/tests/dexlistunspent

2
basilisk/basilisk.c

@ -919,8 +919,6 @@ void basilisks_loop(void *arg)
endmilli = startmilli + 500; endmilli = startmilli + 500;
else endmilli = startmilli + 1000; else endmilli = startmilli + 1000;
} }
if ( myinfo->DEXEXPLORER != 0 )
kmd_bitcoinscan();
if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) ) if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) )
{ {
//fprintf(stderr,"H "); //fprintf(stderr,"H ");

12
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); 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); nanomsg_tcpname(0,str,ipaddr,REP_SOCK);
nn_connect(myinfo->reqsock,str); 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); 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; i<myinfo->numnotaries; i++)
{
decode_hex(myinfo->notaries[i],33,(char *)Notaries_elected[i][1]);
}
printf("default to elected.%d\n",myinfo->numnotaries);
}
free_json(retjson); free_json(retjson);
} }
} }

2
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 liquidity_info linfos[512]; cJSON *liquidity_currencies; struct pending_trade *trades; portable_mutex_t pending_mutex;
struct komodo_notaries NOTARY; struct komodo_notaries NOTARY;
char seedipaddr[64]; uint32_t dpowipbits[128]; int32_t numdpowipbits; portable_mutex_t notarymutex,dpowmutex; 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 // compatibility
bits256 pangea_category,instantdex_category; bits256 pangea_category,instantdex_category;
uint8_t logs[256],exps[510]; uint8_t logs[256],exps[510];

2
iguana/main.c

@ -484,6 +484,8 @@ void mainloop(struct supernet_info *myinfo)
} }
usleep(30000); usleep(30000);
} }
if ( myinfo->DEXEXPLORER != 0 )
kmd_bitcoinscan();
//pangea_queues(SuperNET_MYINFO(0)); //pangea_queues(SuperNET_MYINFO(0));
//if ( flag == 0 ) //if ( flag == 0 )
// usleep(100000 + isRT*100000 + (numpeers == 0)*1000000); // usleep(100000 + isRT*100000 + (numpeers == 0)*1000000);

1
iguana/tests/KMD.batch11

@ -1,3 +1,4 @@
sleep 99999
# RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295 # RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A KMD 42.40642295
./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 42.40642295 ./komodo-cli sendtoaddress RWTfFTP7c9WxLhgxd2EXSsKszpDVPXHN8A 42.40642295
sleep 3 sleep 3

2
iguana/tests/dexlistunspent

@ -1,2 +1,2 @@
#!/bin/bash #!/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\"}"

Loading…
Cancel
Save