Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AddNumTxs(num int)
- func (c *Cache) AddSwapInfo(swapInfo *types.SwapInfo)
- func (c *Cache) AddTransaction(transaction []*types.Transaction)
- func (c *Cache) Flush()
- func (c *Cache) GetNumTxs() int
- func (c *Cache) GetSwapInfos() []*types.SwapInfo
- func (c *Cache) GetTransactions() []*types.Transaction
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 (*Cache) AddSwapInfo ¶ added in v0.13.0
AddSwapInfo appends swapInfo to cache SwapInfos
func (*Cache) AddTransaction ¶
func (c *Cache) AddTransaction(transaction []*types.Transaction)
AddTransaction append transaction to cache Transactions
func (*Cache) GetSwapInfos ¶ added in v0.13.0
nolint
Click to show internal directories.
Click to hide internal directories.