history

package
v0.8.4-3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HistoricalBatchSSZ = zssz.GetSSZ((*HistoricalBatch)(nil))

Functions

This section is empty.

Types

type HistoricalBatch

type HistoricalBatch struct {
	BlockRoots [SLOTS_PER_HISTORICAL_ROOT]Root
	StateRoots [SLOTS_PER_HISTORICAL_ROOT]Root
}

func (*HistoricalBatch) GetBlockRoot

func (batch *HistoricalBatch) GetBlockRoot(epoch Epoch) Root

Return the block root at a recent epoch. Only valid to SLOTS_PER_HISTORICAL_ROOT slots ago.

func (*HistoricalBatch) GetBlockRootAtSlot

func (batch *HistoricalBatch) GetBlockRootAtSlot(slot Slot) Root

Return the block root at a recent slot. Only valid to SLOTS_PER_HISTORICAL_ROOT slots ago.

type HistoricalRoots

type HistoricalRoots []Root

roots of HistoricalBatch

func (*HistoricalRoots) Limit

func (_ *HistoricalRoots) Limit() uint64

type HistoryState

type HistoryState struct {
	HistoricalBatch // embedded BlockRoots and StateRoots
	HistoricalRoots HistoricalRoots
}

func (*HistoryState) SetRecentRoots

func (state *HistoryState) SetRecentRoots(slot Slot, blockRoot Root, stateRoot Root)

func (*HistoryState) UpdateHistoricalRoots

func (state *HistoryState) UpdateHistoricalRoots()

Jump to

Keyboard shortcuts

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