Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMaxPrice = big.NewInt(500 * params.Nucle)
Functions ¶
This section is empty.
Types ¶
type Oracle ¶
type Oracle struct {
// contains filtered or unexported fields
}
Oracle recommends energy prices based on the content of recent blocks. Suitable for both light and full clients.
func NewOracle ¶
func NewOracle(backend OracleBackend, params Config) *Oracle
NewOracle returns a new energyprice oracle which can recommend suitable energyprice for newly created transaction.
type OracleBackend ¶
type OracleBackend interface { HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) ChainConfig() *params.ChainConfig }
OracleBackend includes all necessary background APIs for oracle.
Click to show internal directories.
Click to hide internal directories.