-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API methods to get height closest to timestamp #344
base: master
Are you sure you want to change the base?
Conversation
There is already an extension method that calculates the height of the block at a certain time: Also, can this not just be a constant value on the federation gateway mainchain? |
It can be. But it will make setup a bit more difficult because you will need to provide it in the arguments. If we do it like that then we don't need this PR and API calls at all, just initialize height at that value and that's it. But imho it's not user friendly. Right now it's not trivial to configure fed gateway already. |
yeah but here it's such a lot of work to retrieve a value we already know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blocking until after release.
Your decision. A lot of work for us or a bit of work during setting it up. I don't mind either way. If you prefer to have it in the setup config then close this PR and I'll do it that way. ps |
Added API methods to controller and client to request block height that is closed to given timestamp.
This is later will be needed to initialize
NextMatureDepositHeight
inCrossChainTransferStore
so the store syncs not from the 1st block but from a block generated at the same time when genesis block of current chain was created.It is not possible to do it now because
CrossChainTransferStore
requires refactoring in order to allow initialization that requires API call to another node.related to #268