util

package
v0.31.14 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateHeightDataAvailable added in v0.31.14

func ValidateHeightDataAvailable(reader archive.Reader, height uint64) error

ValidateHeightDataAvailable checks if the data for the requested height is available in the archive node. If not, it returns an error.

func ValidateRegisterHeightIndexed added in v0.31.14

func ValidateRegisterHeightIndexed(reader archive.Reader, height uint64) error

Types

type Batch

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

func NewBatch

func NewBatch(db *badger.DB) *Batch

func (*Batch) Flush

func (b *Batch) Flush() error

Flush will call the badger Batch's Flush method, in addition, it will call the callbacks added by OnSucceed

func (*Batch) GetWriter

func (b *Batch) GetWriter() *badger.WriteBatch

func (*Batch) OnSucceed

func (b *Batch) OnSucceed(callback func())

OnSucceed adds a callback to execute after the batch has been successfully flushed. useful for implementing the cache where we will only cache after the batch has been successfully flushed

Jump to

Keyboard shortcuts

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