adding sleep delay before connecting to backup nodes
This commit is contained in:
parent
c6383a6f8f
commit
37ece209fa
@ -6026,7 +6026,12 @@
|
||||
</script>
|
||||
|
||||
<script id="SuperNodeStorageScript">
|
||||
function onLoadStartUp() {
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
async function onLoadStartUp() {
|
||||
myPrivKey = prompt("Enter Private Key : ")
|
||||
myPubKey = floCrypto.getPubKeyHex(myPrivKey)
|
||||
myFloID = floCrypto.getFloIDfromPubkeyHex(myPubKey)
|
||||
@ -6044,6 +6049,7 @@
|
||||
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user