mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
eth/gasprice: Update FeeHistory comments
This commit is contained in:
parent
4fdde0f956
commit
80a12cab9b
1 changed files with 5 additions and 3 deletions
|
|
@ -219,14 +219,16 @@ func (oracle *Oracle) resolveBlockRange(ctx context.Context, reqEnd rpc.BlockNum
|
||||||
// or blocks older than a certain age (specified in maxHistory). The first block of the
|
// or blocks older than a certain age (specified in maxHistory). The first block of the
|
||||||
// actually processed range is returned to avoid ambiguity when parts of the requested range
|
// actually processed range is returned to avoid ambiguity when parts of the requested range
|
||||||
// are not available or when the head has changed during processing this request.
|
// are not available or when the head has changed during processing this request.
|
||||||
// Three arrays are returned based on the processed blocks:
|
// Five arrays are returned based on the processed blocks:
|
||||||
// - reward: the requested percentiles of effective priority fees per gas of transactions in each
|
// - reward: the requested percentiles of effective priority fees per gas of transactions in each
|
||||||
// block, sorted in ascending order and weighted by gas used.
|
// block, sorted in ascending order and weighted by gas used.
|
||||||
// - baseFee: base fee per gas in the given block
|
// - baseFee: base fee per gas in the given block
|
||||||
// - gasUsedRatio: gasUsed/gasLimit in the given block
|
// - gasUsedRatio: gasUsed/gasLimit in the given block
|
||||||
|
// - blobBaseFee: the blob base fee per gas in the given block
|
||||||
|
// - blobGasUsedRatio: blobGasUsed/blobGasLimit in the given block
|
||||||
//
|
//
|
||||||
// Note: baseFee includes the next block after the newest of the returned range, because this
|
// Note: baseFee and blobBaseFee both include the next block after the newest of the returned range,
|
||||||
// value can be derived from the newest block.
|
// because this value can be derived from the newest block.
|
||||||
func (oracle *Oracle) FeeHistory(ctx context.Context, blocks uint64, unresolvedLastBlock rpc.BlockNumber, rewardPercentiles []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, []*big.Int, []float64, error) {
|
func (oracle *Oracle) FeeHistory(ctx context.Context, blocks uint64, unresolvedLastBlock rpc.BlockNumber, rewardPercentiles []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, []*big.Int, []float64, error) {
|
||||||
if blocks < 1 {
|
if blocks < 1 {
|
||||||
return common.Big0, nil, nil, nil, nil, nil, nil // returning with no data and no error means there are no retrievable blocks
|
return common.Big0, nil, nil, nil, nil, nil, nil // returning with no data and no error means there are no retrievable blocks
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue