Documentation
¶
Index ¶
- type RecommendedFeePolicy
- type RecommendedFeePolicyType
- type Updater
- func (u *Updater) SetSCVars(vars *common.SCVariablesPtr)
- func (u *Updater) Store() error
- func (u *Updater) UpdateMetrics() error
- func (u *Updater) UpdateNetworkInfo(lastEthBlock, lastSyncBlock common.Block, lastBatchNum common.BatchNum, ...) error
- func (u *Updater) UpdateNetworkInfoBlock(lastEthBlock, lastSyncBlock common.Block)
- func (u *Updater) UpdateRecommendedFee() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecommendedFeePolicy ¶
type RecommendedFeePolicy struct {
PolicyType RecommendedFeePolicyType `validate:"required"`
StaticValue float64
}
RecommendedFeePolicy describes how the recommended fee is calculated
type RecommendedFeePolicyType ¶
type RecommendedFeePolicyType string
RecommendedFeePolicyType describes the different available recommended fee strategies
const ( // RecommendedFeePolicyTypeStatic always give the same StaticValue as recommended fee RecommendedFeePolicyTypeStatic RecommendedFeePolicyType = "Static" // RecommendedFeePolicyTypeAvgLastHour set the recommended fee using the average fee of the last hour RecommendedFeePolicyTypeAvgLastHour RecommendedFeePolicyType = "AvgLastHour" )
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater is an utility object to facilitate updating the StateAPI
func NewUpdater ¶
func NewUpdater(hdb *historydb.HistoryDB, config *historydb.NodeConfig, vars *common.SCVariables, consts *historydb.Constants, rfp *RecommendedFeePolicy) (*Updater, error)
NewUpdater creates a new Updater
func (*Updater) SetSCVars ¶
func (u *Updater) SetSCVars(vars *common.SCVariablesPtr)
SetSCVars sets the smart contract vars (ony updates those that are not nil)
func (*Updater) UpdateMetrics ¶
UpdateMetrics update Status.Metrics information
func (*Updater) UpdateNetworkInfo ¶
func (u *Updater) UpdateNetworkInfo( lastEthBlock, lastSyncBlock common.Block, lastBatchNum common.BatchNum, currentSlot int64, ) error
UpdateNetworkInfo update Status.Network information
func (*Updater) UpdateNetworkInfoBlock ¶
UpdateNetworkInfoBlock update Status.Network block related information
func (*Updater) UpdateRecommendedFee ¶
UpdateRecommendedFee update Status.RecommendedFee information
Click to show internal directories.
Click to hide internal directories.