bootstrapStorage

package
v1.0.85 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBootStorer = errors.New("nil boot storer")

ErrNilBootStorer signals that an operation has been attempted to or with a nil storer implementation

View Source
var ErrNilMarshalizer = errors.New("nil Marshalizer")

ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation

Functions

func NewBootstrapStorer

func NewBootstrapStorer(
	marshalizer marshal.Marshalizer,
	store storage.Storer,
) (*bootstrapStorer, error)

NewBootstrapStorer will return an instance of bootstrap storer

Types

type BootstrapData

type BootstrapData struct {
	LastHeader                BootstrapHeaderInfo
	LastCrossNotarizedHeaders []BootstrapHeaderInfo
	LastSelfNotarizedHeaders  []BootstrapHeaderInfo
	ProcessedMiniBlocks       []MiniBlocksInMeta
	PendingMiniBlocks         []PendingMiniBlockInfo
	HighestFinalBlockNonce    uint64
	LastRound                 int64
}

BootstrapData is used to store information that are needed for bootstrap

type BootstrapHeaderInfo

type BootstrapHeaderInfo struct {
	ShardId uint32
	Nonce   uint64
	Hash    []byte
}

BootstrapHeaderInfo is used to store information about a header

func TrimHeaderInfoSlice added in v1.0.63

func TrimHeaderInfoSlice(in []BootstrapHeaderInfo) []BootstrapHeaderInfo

TrimHeaderInfoSlice creates a copy of the provided slice without the excess capacity

type MiniBlocksInMeta

type MiniBlocksInMeta struct {
	MetaHash         []byte
	MiniBlocksHashes [][]byte
}

MiniBlocksInMeta is used to store all mini blocks hashes for a metablock hash

type PendingMiniBlockInfo added in v1.0.82

type PendingMiniBlockInfo struct {
	ShardID              uint32
	NumPendingMiniBlocks uint32
}

PendingMiniBlockInfo is used to store information about the number of pending miniblocks

Jump to

Keyboard shortcuts

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