From 6d99c036bc9360f19632705d4b315da12206e9b6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 21 Jan 2017 13:02:07 +0200 Subject: [PATCH] test --- iguana/dpow/dpow_network.c | 2 +- iguana/dpow/dpow_rpc.c | 2 +- iguana/iguana_notary.c | 6 +++++- iguana/tests/dexkvsearch | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index b102cf6f7..d224f3e29 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -774,7 +774,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); + //printf("_DEX.(%s) -> (%s) flags.%d\n",key,value,flags); return(_dex_sendrequeststr(myinfo,&dexreq,keyvalue,keylen+valuesize+2,1,"")); } diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index 8add9884b..4500ada34 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -416,7 +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); + //printf("KVUPDATE.%s\n",params); retstr = bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"kvupdate",params); if ( (retjson= cJSON_Parse(retstr)) == 0 ) { diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index da09f9d33..e3eab5785 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -690,7 +690,11 @@ THREE_STRINGS_AND_THREE_INTS(dex,kvupdate,symbol,key,value,flags,unused,unusedb) return(clonestr("{\"error\":\"only single duration updates via remote access\"}")); else if ( strlen(key) > 64 || strlen(value) > 256 ) return(clonestr("{\"error\":\"only keylen <=64 and valuesize <= 256 allowed via remote access\"}")); - else return(_dex_kvupdate(myinfo,symbol,key,value,flags)); + else + { + //printf("call _dex_kvupdate.(%s) -> (%s) flags.%d\n",key,value,flags); + return(_dex_kvupdate(myinfo,symbol,key,value,flags)); + } } else return(clonestr("{\"error\":\"free updates only on KV chain\"}")); } diff --git a/iguana/tests/dexkvsearch b/iguana/tests/dexkvsearch index 201ac6352..178a08c42 100755 --- a/iguana/tests/dexkvsearch +++ b/iguana/tests/dexkvsearch @@ -1,3 +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\":\"foo\",\"symbol\":\"KMD\"}" curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"kvsearch\",\"key\":\"test\",\"symbol\":\"KV\"}"