Documentation
¶
Index ¶
- type Block
- type BlockIterator
- type ImmutableDb
- func (i *ImmutableDb) BlocksFromPoint(point ocommon.Point) (*BlockIterator, error)
- func (i *ImmutableDb) GetBlock(point ocommon.Point) (*Block, error)
- func (i *ImmutableDb) GetTip() (*ocommon.Point, error)
- func (i *ImmutableDb) LastSlotInChunk(num uint64) (uint64, bool, error)
- func (i *ImmutableDb) TruncateChunksFromPoint(point ocommon.Point) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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
Click to show internal directories.
Click to hide internal directories.