archive

package
v0.0.0-...-71c2772 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const EpochSize = 32

EpochSize Maximum amount of blocks without a full one

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(path string, consensus *sidechain.Consensus, difficultyByHeight block.GetDifficultyByHeightFunc) (*Cache, error)

func (*Cache) Close

func (c *Cache) Close()

func (*Cache) ExistsByMainId

func (c *Cache) ExistsByMainId(id types.Hash) (result bool)

func (*Cache) LoadByMainChainHeight

func (c *Cache) LoadByMainChainHeight(height uint64) (result sidechain.UniquePoolBlockSlice)

func (*Cache) LoadByMainId

func (c *Cache) LoadByMainId(id types.Hash) *sidechain.PoolBlock

func (*Cache) LoadBySideChainHeight

func (c *Cache) LoadBySideChainHeight(height uint64) (result sidechain.UniquePoolBlockSlice)

func (*Cache) LoadByTemplateId

func (c *Cache) LoadByTemplateId(id types.Hash) (result sidechain.UniquePoolBlockSlice)

func (*Cache) ProcessBlock

func (c *Cache) ProcessBlock(b *sidechain.PoolBlock) error

func (*Cache) RemoveByMainId

func (c *Cache) RemoveByMainId(id types.Hash)

func (*Cache) RemoveByTemplateId

func (c *Cache) RemoveByTemplateId(id types.Hash)

func (*Cache) ScanHeights

func (c *Cache) ScanHeights(startHeight, endHeight uint64) chan sidechain.UniquePoolBlockSlice

func (*Cache) Store

func (c *Cache) Store(block *sidechain.PoolBlock)

Jump to

Keyboard shortcuts

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