Browse Source

test

etomic
jl777 8 years ago
parent
commit
12d8bcdf11
  1. 1
      iguana/dpow/dpow_network.c
  2. 1
      iguana/dpow/dpow_rpc.c
  3. 1
      iguana/tests/dexkvsearch
  4. 3
      iguana/tests/dexkvupdate

1
iguana/dpow/dpow_network.c

@ -773,6 +773,7 @@ char *_dex_kvupdate(struct supernet_info *myinfo,char *symbol,char *key,char *va
valuesize = (int32_t)strlen(value);
dexreq.shortarg = keylen+1;
memcpy(&keyvalue[dexreq.shortarg],value,valuesize+1);
printf("_DEX.(%s) -> (%s) flags.%d\n",key,value,flags);
return(_dex_sendrequeststr(myinfo,&dexreq,keyvalue,1,""));
}

1
iguana/dpow/dpow_rpc.c

@ -416,6 +416,7 @@ cJSON *dpow_kvupdate(struct supernet_info *myinfo,struct iguana_info *coin,char
if ( coin->FULLNODE < 0 )
{
sprintf(params,"[\"%s\", \"%s\", \"%d\"]",key,value,flags);
printf("KVUPDATE.%s\n",params);
retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"kvupdate",params);
if ( (retjson= cJSON_Parse(retstr)) == 0 )
{

1
iguana/tests/dexkvsearch

@ -1,2 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvsearch\",\"key\":\"foo\",\"symbol\":\"KMD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvsearch\",\"key\":\"test\",\"symbol\":\"KV\"}"

3
iguana/tests/dexkvupdate

@ -1,2 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvupdate\",\"key\":\"foo\",\"value\":\"$1\",\"flags\":0,\"symbol\":\"KMD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvupdate\",\"key\":\"test\",\"value\":\"$1\",\"flags\":0,\"symbol\":\"KMD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvupdate\",\"key\":\"test\",\"value\":\"$1\",\"flags\":0,\"symbol\":\"KV\"}"

Loading…
Cancel
Save