blockgascost

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2025 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

blockgascost implements the block gas cost logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockGasCost

func BlockGasCost(
	feeConfig commontype.FeeConfig,
	parentCost uint64,
	step uint64,
	timeElapsed uint64,
) uint64

BlockGasCost calculates the required block gas cost.

cost = parentCost + step * (TargetBlockRate - timeElapsed)

The returned cost is clamped to [MinBlockGasCost, MaxBlockGasCost].

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL