blockfile

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// freezerHashTable indicates the name of the freezer canonical hash table.
	BlockFileHashTable = "hashes"

	// freezerBodiesTable indicates the name of the freezer block body table.
	BlockFileBodiesTable = "bodies"

	// freezerHeaderTable indicates the name of the freezer header table.
	BlockFileTXsTable = "transactions"

	// freezerReceiptTable indicates the name of the freezer receipts table.
	BlockFileReceiptTable = "receipts"
)

Variables

Functions

This section is empty.

Types

type BlockFile

type BlockFile struct {
	// contains filtered or unexported fields
}

func NewBlockFile

func NewBlockFile(repoRoot string, logger logrus.FieldLogger) (*BlockFile, error)

func (*BlockFile) AppendBlock

func (bf *BlockFile) AppendBlock(number uint64, hash, body, receipts, transactions []byte) (err error)

func (*BlockFile) Blocks

func (bf *BlockFile) Blocks() (uint64, error)

func (*BlockFile) Close

func (bf *BlockFile) Close() error

func (*BlockFile) Get

func (bf *BlockFile) Get(kind string, number uint64) ([]byte, error)

func (*BlockFile) TruncateBlocks

func (bf *BlockFile) TruncateBlocks(items uint64) error

type BlockTable

type BlockTable struct {
	// contains filtered or unexported fields
}

func (*BlockTable) Append

func (b *BlockTable) Append(item uint64, blob []byte) error

func (*BlockTable) Close

func (b *BlockTable) Close() error

Close closes all opened files.

func (*BlockTable) Retrieve

func (b *BlockTable) Retrieve(item uint64) ([]byte, error)

Jump to

Keyboard shortcuts

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