-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Move KeySpecific field #9694
Move KeySpecific field #9694
Conversation
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
@george-dorin Is moving it into GasEstimator correct? According to the docs, there's this:
Which suggests that we should have cfg.EVM().KeySpecific().GasEstimator().PriceMax() or similar (KeySpecific().GasEstimatorPriceMax()?) |
blockDelay *uint16 | ||
transactionsMaxInFlight *uint32 | ||
} | ||
|
||
func (g *gasEstimatorConfig) KeySpecificMaxPrice(addr gethcommon.Address) *assets.Wei { |
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.
Maybe we should consider naming this a little differently?
func (g *gasEstimatorConfig) KeySpecificMaxPrice(addr gethcommon.Address) *assets.Wei { | |
func (g *gasEstimatorConfig) MaxPriceKey(addr gethcommon.Address) *assets.Wei { |
func (g *gasEstimatorConfig) KeySpecificMaxPrice(addr gethcommon.Address) *assets.Wei { | |
func (g *gasEstimatorConfig) MaxPriceByKey(addr gethcommon.Address) *assets.Wei { |
func (g *gasEstimatorConfig) KeySpecificMaxPrice(addr gethcommon.Address) *assets.Wei { | |
func (g *gasEstimatorConfig) MaxPriceForKey(addr gethcommon.Address) *assets.Wei { |
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.
Sure, that makes more sense, renamed in b6cfd04
Oh I think it get's weird because we don't just look up the field directly, we fallback to default and also constraint a bound? |
…e_key_specific_gas_estimator
Yeah, this field is sort of odd because of the fallback, placing it in the gasEstimator makes the most sense and leads to a much cleaner implementation. |
@george-dorin Makes sense! In that case, should we change the Config structure to reflect this, i.e. move KeySpecific under GasEstimator? (This is probably out of scope for this PR, but if we want to do this maybe we can put it on the backlog) |
Yes, we could definitely do this, will make a ticket |
SonarQube Quality Gate |
KeySpecificMaxGasPriceWei
intoGasEstimator
KeySpecificMaxGasPriceWei
toKeySpecificMaxPrice
to better match the config name