Skip to content

fix: update latest block number when adding a block#255

Merged
fmoletta merged 1 commit into
mainfrom
update_latest_block_when_adding_block
Aug 16, 2024
Merged

fix: update latest block number when adding a block#255
fmoletta merged 1 commit into
mainfrom
update_latest_block_when_adding_block

Conversation

@fmoletta

@fmoletta fmoletta commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

Motivation

When we add a block to this store this block will always become the latest block.
Previously we handled this by updating the latest block number after we added a new block but this was not consistent as we had to remember to update the last block number after each call to add block, leading to bugs.
This PR aims to solve this issue by including the update of the latest block number in the store's add block functionality.

Description

  • Call update_latest_block_number in Store::add_block
  • Remove calls to update_latest_block_number elsewhere

Closes Closes #266

@fmoletta fmoletta marked this pull request as ready for review August 14, 2024 18:31
@fmoletta fmoletta requested a review from a team as a code owner August 14, 2024 18:31
@fmoletta fmoletta added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit 4f033f0 Aug 16, 2024
@fmoletta fmoletta deleted the update_latest_block_when_adding_block branch August 16, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hive Testing: eth_blockNumber

3 participants