cache

package module
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: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressableCache

type AddressableCache interface {
	Cache

	RemoveByMainId(id types.Hash)
	RemoveByTemplateId(id types.Hash)

	LoadByMainId(id types.Hash) *sidechain.PoolBlock
	// LoadByTemplateId returns a slice of loaded blocks. If more than one, these might have colliding nonce / extra nonce values
	LoadByTemplateId(id types.Hash) sidechain.UniquePoolBlockSlice
	LoadBySideChainHeight(height uint64) sidechain.UniquePoolBlockSlice
	LoadByMainChainHeight(height uint64) sidechain.UniquePoolBlockSlice

	// ProcessBlock blocks returned on other Load methods may return pruned/compact blocks. Use this to process them
	ProcessBlock(block *sidechain.PoolBlock) error
}

type Cache

type Cache interface {
	Store(block *sidechain.PoolBlock)
	Close()
}

type HeapCache

type HeapCache interface {
	Cache
	LoadAll(l Loadee)
}

type IndexedCache

type IndexedCache interface {
	AddressableCache
}

type Loadee

type Loadee interface {
	sidechain.ConsensusProvider
	AddCachedBlock(block *sidechain.PoolBlock)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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