immutable

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Hash  []byte
	Cbor  []byte
	Type  uint
	Slot  uint64
	IsEbb bool
}

type BlockIterator

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

func (*BlockIterator) Close

func (b *BlockIterator) Close() error

func (*BlockIterator) Next

func (b *BlockIterator) Next() (*Block, error)

type ImmutableDb

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

func New

func New(dataDir string) (*ImmutableDb, error)

New returns a new ImmutableDb using the specified data directory or an error

func (*ImmutableDb) BlocksFromPoint

func (i *ImmutableDb) BlocksFromPoint(
	point ocommon.Point,
) (*BlockIterator, error)

func (*ImmutableDb) GetBlock

func (i *ImmutableDb) GetBlock(point ocommon.Point) (*Block, error)

func (*ImmutableDb) GetTip

func (i *ImmutableDb) GetTip() (*ocommon.Point, error)

func (*ImmutableDb) LastSlotInChunk added in v0.60.1

func (i *ImmutableDb) LastSlotInChunk(
	num uint64,
) (uint64, bool, error)

LastSlotInChunk returns the slot of the last block in the chunk at the given 0-based index. The second return value is false when num is beyond the chunks currently present, with no error. This bounds an incremental copy to a contiguous chunk prefix while later chunks may still be downloading out of order: chunks 0..num are known complete, so num maps to the num-th sorted chunk name.

func (*ImmutableDb) TruncateChunksFromPoint

func (i *ImmutableDb) TruncateChunksFromPoint(point ocommon.Point) error

Jump to

Keyboard shortcuts

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