cache

package
v0.18.10 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// Flush at EndBlock
	Transactions []*types.Transaction

	// persist in memory
	LatestTicker map[string]*types.Ticker
	// contains filtered or unexported fields
}

Cache defines struct to store data in memory

func NewCache

func NewCache() *Cache

NewCache return cache pointer address, called at NewKeeper

func (*Cache) AddClaimInfo

func (c *Cache) AddClaimInfo(claimInfo *types.ClaimInfo)

AddClaimInfo appends claimInfo to cache ClaimInfos

func (*Cache) AddSwapInfo

func (c *Cache) AddSwapInfo(swapInfo *types.SwapInfo)

AddSwapInfo appends swapInfo to cache SwapInfos

func (*Cache) AddTransaction

func (c *Cache) AddTransaction(transaction []*types.Transaction)

AddTransaction append transaction to cache Transactions

func (*Cache) Flush

func (c *Cache) Flush()

Flush temporary cache, called at EndBlock

func (*Cache) GetClaimInfos

func (c *Cache) GetClaimInfos() []*types.ClaimInfo

nolint

func (*Cache) GetSwapInfos

func (c *Cache) GetSwapInfos() []*types.SwapInfo

nolint

func (*Cache) GetTransactions

func (c *Cache) GetTransactions() []*types.Transaction

nolint

Jump to

Keyboard shortcuts

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