gasprice

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LpoAvgCount     = 5
	LpoMinCount     = 3
	LpoMaxBlocks    = 20
	LpoSelect       = 50
	LpoDefaultPrice = 20000000000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GasPriceOracle added in v1.5.0

type GasPriceOracle struct {
	// contains filtered or unexported fields
}

GasPriceOracle recommends gas prices based on the content of recent blocks.

func NewGasPriceOracle added in v1.5.0

func NewGasPriceOracle(chain *core.BlockChain, db ethdb.Database, evmux *event.TypeMux, params *GpoParams) *GasPriceOracle

NewGasPriceOracle returns a new oracle.

func (*GasPriceOracle) SuggestPrice added in v1.5.0

func (self *GasPriceOracle) SuggestPrice() *big.Int

SuggestPrice returns the recommended gas price.

type GpoParams added in v1.5.0

type GpoParams struct {
	GpoMinGasPrice          *big.Int
	GpoMaxGasPrice          *big.Int
	GpoFullBlockRatio       int
	GpobaseStepDown         int
	GpobaseStepUp           int
	GpobaseCorrectionFactor int
}

type LightPriceOracle added in v1.5.0

type LightPriceOracle struct {
	// contains filtered or unexported fields
}

LightPriceOracle recommends gas prices based on the content of recent blocks. Suitable for both light and full clients.

func NewLightPriceOracle added in v1.5.0

func NewLightPriceOracle(backend ethapi.Backend) *LightPriceOracle

NewLightPriceOracle returns a new oracle.

func (*LightPriceOracle) SuggestPrice added in v1.5.0

func (self *LightPriceOracle) SuggestPrice(ctx context.Context) (*big.Int, error)

SuggestPrice returns the recommended gas price.

Jump to

Keyboard shortcuts

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