Browse Source

prox

master
zeus 4 years ago
parent
commit
3fbd4aef73
  1. 15
      swarmlab-app/src/run/app.js

15
swarmlab-app/src/run/app.js

@ -431,20 +431,23 @@ function getSHA256ofJSON(input){
return require("crypto").createHash("sha256").update(JSON.stringify(input)).digest("hex");
}
var getkey = function getkey(key) {
return new Promise((resolve) => {
//var getkey = function getkey(key) {
async function getkey(key) {
//return new Promise((resolve) => {
pubClient.get(key, function (err, reply) {
await pubClient.get(key, function (err, reply) {
if(err){
console.log('----------not fount------------')
resolve(null)
//resolve(null)
return null
}
else {
console.log('---------fount----------')
resolve(reply)
//resolve(reply)
return reply
}
})
})
//})
}
var setkey = function setkv(key,value){

Loading…
Cancel
Save