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