vecache

package
v0.0.0-...-13dda56 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VeCache

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

This cache is used to set prices from vote extensions in processProposal which are fetched in ExtendVoteHandler and PreBlocker. This is to avoid redundant computation on calculating stake weighthed median prices in VEs. Make sure to use this in thread-safe scenarios (e.g., when flow is holding lock on the entire app).

func NewVECache

func NewVECache() *VeCache

func (*VeCache) GetHeight

func (pc *VeCache) GetHeight() int64

func (*VeCache) GetSeenVotesInCache

func (pc *VeCache) GetSeenVotesInCache() map[string]struct{}

func (*VeCache) SetSeenVotesInCache

func (pc *VeCache) SetSeenVotesInCache(
	ctx sdk.Context,
	consAddresses map[string]struct{},
)

Jump to

Keyboard shortcuts

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