Documentation ¶
Index ¶
- type ConsensusInfoCache
- func (c *ConsensusInfoCache) AddConsensusInfoCache(epoch types.Epoch, consensusInfo *eventTypes.MinimalEpochConsensusInfo) error
- func (c *ConsensusInfoCache) ConsensusInfoByEpoch(epoch types.Epoch) (*eventTypes.MinimalEpochConsensusInfo, error)
- func (c *ConsensusInfoCache) ConsensusInfoByEpochRange(fromEpoch, toEpoch types.Epoch) map[types.Epoch]*eventTypes.MinimalEpochConsensusInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusInfoCache ¶
type ConsensusInfoCache struct {
// contains filtered or unexported fields
}
ConsensusInfoCache
func NewConsensusInfoCache ¶
func NewConsensusInfoCache() *ConsensusInfoCache
NewConsensusInfoCache creates a new consensus info cache for storing/accessing previous epoch.
func (*ConsensusInfoCache) AddConsensusInfoCache ¶
func (c *ConsensusInfoCache) AddConsensusInfoCache( epoch types.Epoch, consensusInfo *eventTypes.MinimalEpochConsensusInfo, ) error
AddConsensusInfoCache adds ConsensusInfoCache object to the cache.
func (*ConsensusInfoCache) ConsensusInfoByEpoch ¶
func (c *ConsensusInfoCache) ConsensusInfoByEpoch(epoch types.Epoch) (*eventTypes.MinimalEpochConsensusInfo, error)
ConsensusInfoByEpoch fetches consensusInfo by epoch. Returns true with a reference to the consensusInfo, if exists. Otherwise returns false, nil.
func (*ConsensusInfoCache) ConsensusInfoByEpochRange ¶
func (c *ConsensusInfoCache) ConsensusInfoByEpochRange( fromEpoch, toEpoch types.Epoch) map[types.Epoch]*eventTypes.MinimalEpochConsensusInfo
ConsensusInfoByEpochRange
Click to show internal directories.
Click to hide internal directories.