Browse Source

prox

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

15
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){

Loading…
Cancel
Save