Skip to content
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

Update docstrings of Storage fields relating to blocks #650

Merged
merged 3 commits into from Nov 30, 2022

Conversation

james-chf
Copy link
Contributor

@james-chf james-chf commented Oct 20, 2022

This PR updates some docstrings of fields that relate to blocks, to make it clearer how they are currently used in the code.

storage.last_height and storage.last_epoch are always to do with the most recently committed block (assuming at least one block has been committed). Which block other block-related fields are concerned with depends on the stage of ABCI the shell is in. e.g. storage.block.height is the next block to be committed during FinalizeBlock and Commit, but otherwise is the same as storage.last_height.

We could probably at some point get rid of either storage.block.height/storage.block.epoch or storage.last_block/storage.last_epoch and just use one or the other, to simplify things.

@james-chf james-chf changed the title Update docstrings of Storage fields relating to blocks Update docstrings of Storage fields relating to blocks Oct 20, 2022
@james-chf james-chf marked this pull request as ready for review October 26, 2022 16:46
tzemanovic added a commit that referenced this pull request Nov 16, 2022
* james/mainline/last-block:
  Add changelog
  Remove unnecessary clone
  Update docstrings of Storage fields relating to blocks
@tzemanovic tzemanovic mentioned this pull request Nov 16, 2022
@tzemanovic tzemanovic added this to the v0.11.0 milestone Nov 17, 2022
@juped juped merged commit 187e895 into main Nov 30, 2022
@juped juped deleted the james/mainline/last-block branch November 30, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants