From 19e61f1e7ad0d33b12375c39403847c7a5e3d082 Mon Sep 17 00:00:00 2001 From: zeus Date: Sun, 29 Nov 2020 18:19:13 +0200 Subject: [PATCH] prox --- swarmlab-app/src/run/app.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 61aea12..6a82ae5 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -433,28 +433,27 @@ function getSHA256ofJSON(input){ //var getkey = function getkey(key) { async function getkey(key) { - //return new Promise((resolve) => { + return new Promise((resolve) => { - await pubClient.get(key, function (err, reply) { + pubClient.get(key, function (err, reply) { if(err){ console.log('----------error------------') - //resolve(null) - return null + resolve(null) } else { if(reply){ console.log('---------fount----------') - //resolve(reply) - return 1 + resolve(1) }else{ console.log('----------not fount------------') - return 2 + resolve(2) + //return 2 } } }) - //}) + }) } var setkey = function setkv(key,value){