gasprice

package
v0.0.0-...-ac8b7ce Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Blocks     int      // 表示 多少个block , 默认20个, 给预言机用
	Percentile int      // 表示 百分比,默认 60, 预言机用
	Default    *big.Int `toml:",omitempty"`
}

type Oracle

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

Oracle recommends gas prices based on the content of recent blocks. Suitable for both light and full clients. * 预言机

根据最近数据块的内容建议gas价格。 适用于轻量级客户和全面客户。

func NewOracle

func NewOracle(backend ethapi.Backend, params Config) *Oracle

NewOracle returns a new oracle.

func (*Oracle) SuggestPrice

func (gpo *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error)

SuggestPrice returns the recommended gas price. 返回交易的gasPrice

有点 概率学和统计学的意思

Jump to

Keyboard shortcuts

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