blockdb

package
v0.0.0-...-ff2c966 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockAbortCatchup

func BlockAbortCatchup(tx *sql.Tx) error

BlockAbortCatchup TODO: unused, either actually implement cleanup on catchpoint failure, or delete this

func BlockCompleteCatchup

func BlockCompleteCatchup(tx *sql.Tx) (err error)

BlockCompleteCatchup applies catchpoint caught up blocks

func BlockEarliest

func BlockEarliest(tx *sql.Tx) (basics.Round, error)

BlockEarliest returns the lowest persisted round number

func BlockEnsureSingleBlock

func BlockEnsureSingleBlock(tx *sql.Tx) (blk bookkeeping.Block, err error)

BlockEnsureSingleBlock retains only one (highest) block in catchpoint staging table

func BlockForgetBefore

func BlockForgetBefore(tx *sql.Tx, rnd basics.Round) error

BlockForgetBefore removes block entries with round numbers less than the specified round

func BlockGet

func BlockGet(tx *sql.Tx, rnd basics.Round) (blk bookkeeping.Block, err error)

BlockGet retrieves a block by a round number

func BlockGetCert

func BlockGetCert(tx *sql.Tx, rnd basics.Round) (blk bookkeeping.Block, cert agreement.Certificate, err error)

BlockGetCert retrieves block and cert by a round number

func BlockGetEncodedCert

func BlockGetEncodedCert(tx *sql.Tx, rnd basics.Round) (blk []byte, cert []byte, err error)

BlockGetEncodedCert retrieves raw block and cert by a round number

func BlockGetHdr

func BlockGetHdr(tx *sql.Tx, rnd basics.Round) (hdr bookkeeping.BlockHeader, err error)

BlockGetHdr retrieves a block header by a round number

func BlockInit

func BlockInit(tx *sql.Tx, initBlocks []bookkeeping.Block) error

BlockInit initializes blockdb

func BlockLatest

func BlockLatest(tx *sql.Tx) (basics.Round, error)

BlockLatest returns the latest persisted round number

func BlockNext

func BlockNext(tx *sql.Tx) (basics.Round, error)

BlockNext returns the next expected round number

func BlockPut

func BlockPut(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) error

BlockPut stores block and certificate

func BlockPutStaging

func BlockPutStaging(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) (err error)

BlockPutStaging store a block into catchpoint staging table

func BlockResetDB

func BlockResetDB(tx *sql.Tx) error

BlockResetDB resets blockdb

func BlockStartCatchupStaging

func BlockStartCatchupStaging(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) error

BlockStartCatchupStaging initializes catchup for catchpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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