Conversation
mattsse
approved these changes
Apr 26, 2024
crates/anvil/src/eth/api.rs
Outdated
Comment on lines
1323
to
1328
a651007 to
b13d7e9
Compare
b13d7e9 to
012337b
Compare
Member
Author
|
@mattsse decided to go with a simpler fix and just push the |
klkvr
commented
Apr 26, 2024
Comment on lines
-1058
to
+1063
| // notify all listeners | ||
| self.notify_on_new_block(header, block_hash); | ||
|
|
||
| // update next base fee | ||
| self.fees.set_base_fee(next_block_base_fee); | ||
|
|
||
| // notify all listeners | ||
| self.notify_on_new_block(header, block_hash); | ||
|
|
Member
Author
There was a problem hiding this comment.
this was a subject to race condition anyway, but this just ensures that value in fees is always up to date
mattsse
approved these changes
Apr 27, 2024
Comment on lines
-1058
to
+1063
| // notify all listeners | ||
| self.notify_on_new_block(header, block_hash); | ||
|
|
||
| // update next base fee | ||
| self.fees.set_base_fee(next_block_base_fee); | ||
|
|
||
| // notify all listeners | ||
| self.notify_on_new_block(header, block_hash); | ||
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #7769
Logic for determining pending block base fee is currently different in
eth_feeHistoryhandler and miner itself. Thus, using value for pending block base fee returned byfeeHistorywill result in errors as it will be lower than actual base feeThis PR contains 2 changes:
87500000000by default as genesis block is always empty.eth_feeHistory.