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) { //var getkey = function getkey(key) {
async 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){ if(err){
console.log('----------error------------') console.log('----------error------------')
//resolve(null) resolve(null)
return null
} }
else { else {
if(reply){ if(reply){
console.log('---------fount----------') console.log('---------fount----------')
//resolve(reply) resolve(1)
return 1
}else{ }else{
console.log('----------not fount------------') console.log('----------not fount------------')
return 2 resolve(2)
//return 2
} }
} }
}) })
//}) })
} }
var setkey = function setkv(key,value){ var setkey = function setkv(key,value){

Loading…
Cancel
Save