bug fix : removing async sleep

This commit is contained in:
sairajzero 2019-11-16 19:36:11 +05:30
parent 37ece209fa
commit 2757aaa20e

View File

@ -6031,7 +6031,7 @@
return new Promise(resolve => setTimeout(resolve, ms));
}
async function onLoadStartUp() {
function onLoadStartUp() {
myPrivKey = prompt("Enter Private Key : ")
myPubKey = floCrypto.getPubKeyHex(myPrivKey)
myFloID = floCrypto.getFloIDfromPubkeyHex(myPubKey)
@ -6049,10 +6049,11 @@
setInterval(refreshBlockchainData, 3600000);
floSupernode.initSupernode(serverPwd, myFloID).then(result => {
console.log(result)
await sleep(5000)
connectToAllBackupSupernode().then(result => {
console.log(result)
reactor.dispatchEvent("indicate_supernode_up",myFloID)
sleep(5000).then( _ => {
connectToAllBackupSupernode().then(result => {
console.log(result)
reactor.dispatchEvent("indicate_supernode_up",myFloID)
})
})
})
})