snapshot_format

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBlockHeaderFromSnapshotWithExecutionData

func ReadBlockHeaderFromSnapshotWithExecutionData(r io.Reader) (*cltypes.SignedBeaconBlockHeader, uint64, libcommon.Hash, error)

ReadBlockHeaderFromSnapshotWithExecutionData reads the beacon block header and the EL block number and block hash.

func ReadRawBlockFromSnapshot

func ReadRawBlockFromSnapshot(r io.Reader, out io.Writer, executionReader ExecutionBlockReaderByNumber, cfg *clparams.BeaconChainConfig) (clparams.StateVersion, error)

func WriteBlockForSnapshot

func WriteBlockForSnapshot(w io.Writer, block *cltypes.SignedBeaconBlock, reusable []byte) ([]byte, error)

WriteBlockForSnapshot writes a block to the given writer in the format expected by the snapshot. buf is just a reusable buffer. if it had to grow it will be returned back as grown.

Types

type ExecutionBlockReaderByNumber

type ExecutionBlockReaderByNumber interface {
	TransactionsSSZ(w io.Writer, number uint64, hash libcommon.Hash) error
	WithdrawalsSZZ(w io.Writer, number uint64, hash libcommon.Hash) error
}

type MockBlockReader

type MockBlockReader struct {
	Block *cltypes.Eth1Block
}

func (*MockBlockReader) TransactionsSSZ

func (t *MockBlockReader) TransactionsSSZ(out io.Writer, number uint64, hash libcommon.Hash) error

func (*MockBlockReader) WithdrawalsSZZ

func (t *MockBlockReader) WithdrawalsSZZ(out io.Writer, number uint64, hash libcommon.Hash) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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