Last active
May 24, 2022 06:44
-
-
Save nnzo/954222e0fec9d0d84159135a823afed7 to your computer and use it in GitHub Desktop.
Monitor Geth node progress script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PASTE the below into your Geth Javascript console (geth attach) | |
// Every minute it'll report the total days and estimated blocks per second | |
lastSyncedBlock = 1; | |
(function percentage() { | |
ee = eth.syncing.currentBlock - lastSyncedBlock | |
perSecond = (ee / 60).toFixed(3) | |
totalSeconds = (eth.syncing.highestBlock - eth.syncing.currentBlock) / perSecond | |
totalDays = (totalSeconds / 86400).toFixed(4) | |
console.log('Rate of ' + perSecond + ' blocks per second. ' + 'Estimated ' + totalDays + ' days.') | |
lastSyncedBlock = eth.syncing.currentBlock | |
setTimeout(percentage, 60000); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment