How can I get the next Epoch.No using Postgresql. If I use

'SELECT no FROM epoch ORDER BY no desc limit 1'

, it returned last epoch/currentEpoch, if I want to receive the next Epoch.No, what should I do? Thanks for your help

1 Answer 1


The epoch table is populated at the beginning of the epoch, actually more accurately at the first block received for that epoch. You can't get data that doesn't exist. If you're wondering what the next epoch is though, just take the result of that query and add 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.