socket fixed
This commit is contained in:
parent
d81ef51262
commit
c82de3cae2
@ -187,9 +187,9 @@ console.log(__dirname);
|
|||||||
});
|
});
|
||||||
const io = require("socket.io").listen(server);
|
const io = require("socket.io").listen(server);
|
||||||
io.sockets.on("connection", socket => {
|
io.sockets.on("connection", socket => {
|
||||||
setInterval(function() {
|
//setTimeout(function() {
|
||||||
universalGetLatestBlockDetails(socket);
|
universalGetLatestBlockDetails(socket);
|
||||||
},1000);
|
//},1000);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -295,4 +295,7 @@ export async function universalGetLatestBlockDetails(socket) {
|
|||||||
TotalDifficultyRandomx:
|
TotalDifficultyRandomx:
|
||||||
BlockchainLatestBlockQuery[0].total_difficulty_randomx
|
BlockchainLatestBlockQuery[0].total_difficulty_randomx
|
||||||
});
|
});
|
||||||
|
setTimeout(function() {
|
||||||
|
universalGetLatestBlockDetails(socket);
|
||||||
|
},1000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user