cache

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(size int, state state.Facade) (*Cache, error)

func (*Cache) AddBlock

func (c *Cache) AddBlock(height uint32, block *block.Block)

func (*Cache) AddBlocks

func (c *Cache) AddBlocks(height uint32, blocks []*block.Block)

func (*Cache) AddCertificate

func (c *Cache) AddCertificate(height uint32, cert *block.Certificate)

func (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) GetBlock

func (c *Cache) GetBlock(height uint32) *block.Block

func (*Cache) GetCertificate

func (c *Cache) GetCertificate(height uint32) *block.Certificate

func (*Cache) HasBlockInCache

func (c *Cache) HasBlockInCache(height uint32) bool

func (*Cache) Len

func (c *Cache) Len() int

Jump to

Keyboard shortcuts

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