-
Notifications
You must be signed in to change notification settings - Fork 328
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] impl eth_feeHistory #4527
Conversation
for i, p := range percentiles { | ||
idx := int(float64(len(ascFees)) * p) | ||
if idx >= len(ascFees) { | ||
idx = len(ascFees) - 1 |
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.
is it possible this if
can enter multiple times in the loop?
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.
It should only happens when p equlas 1, b/c the convertion from float to int will truncate the decimal part in Golang
gasstation/cache.go
Outdated
|
||
type blockPercents struct { | ||
ascEffectivePriorityFees []*big.Int | ||
} |
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.
i think can directly add into gasstation.go
? seems too less of code change to make a new file
Quality Gate passedIssues Measures |
Description
impl the eth_feeHistory API
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: