gasprice

package
v1.5.4-BETA Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2016 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

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

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

func NewGasPriceOracle

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

NewGasPriceOracle returns a new oracle.

func (*GasPriceOracle) SuggestPrice

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

SuggestPrice returns the recommended gas price.

type GpoParams

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

type LightPriceOracle

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

func NewLightPriceOracle(backend ethapi.Backend) *LightPriceOracle

NewLightPriceOracle returns a new oracle.

func (*LightPriceOracle) SuggestPrice

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