operationfeestats

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package operationfeestats provides useful utilities concerning operation fee stats within hcnet,specifically as a central location to store a cached snapshot of the state of network per operation fees and surge pricing. This package is intended to be at the lowest levels of aurora's dependency tree, please keep it free of dependencies to other aurora packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetState

func ResetState()

ResetState is used only for testing purposes

func SetState

func SetState(next State)

SetState updates the cached snapshot of the operation fee state

Types

type State

type State struct {
	FeeChargedMax  int64
	FeeChargedMin  int64
	FeeChargedMode int64
	FeeChargedP10  int64
	FeeChargedP20  int64
	FeeChargedP30  int64
	FeeChargedP40  int64
	FeeChargedP50  int64
	FeeChargedP60  int64
	FeeChargedP70  int64
	FeeChargedP80  int64
	FeeChargedP90  int64
	FeeChargedP95  int64
	FeeChargedP99  int64

	// MaxFee
	MaxFeeMax  int64
	MaxFeeMin  int64
	MaxFeeMode int64
	MaxFeeP10  int64
	MaxFeeP20  int64
	MaxFeeP30  int64
	MaxFeeP40  int64
	MaxFeeP50  int64
	MaxFeeP60  int64
	MaxFeeP70  int64
	MaxFeeP80  int64
	MaxFeeP90  int64
	MaxFeeP95  int64
	MaxFeeP99  int64

	LastBaseFee         int64
	LastLedger          uint32
	LedgerCapacityUsage string
}

State represents a snapshot of aurora's view of the state of operation fee's on the network.

func CurrentState

func CurrentState() (State, bool)

CurrentState returns the cached snapshot of operation fee state and a boolean indicating if the cache has been populated

Jump to

Keyboard shortcuts

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