Documentation
¶
Index ¶
- func BlockAbortCatchup(tx *sql.Tx) error
- func BlockCompleteCatchup(tx *sql.Tx) (err error)
- func BlockEarliest(tx *sql.Tx) (basics.Round, error)
- func BlockEnsureSingleBlock(tx *sql.Tx) (blk bookkeeping.Block, err error)
- func BlockForgetBefore(tx *sql.Tx, rnd basics.Round) error
- func BlockGet(tx *sql.Tx, rnd basics.Round) (blk bookkeeping.Block, err error)
- func BlockGetCert(tx *sql.Tx, rnd basics.Round) (blk bookkeeping.Block, cert agreement.Certificate, err error)
- func BlockGetEncodedCert(tx *sql.Tx, rnd basics.Round) (blk []byte, cert []byte, err error)
- func BlockGetHdr(tx *sql.Tx, rnd basics.Round) (hdr bookkeeping.BlockHeader, err error)
- func BlockInit(tx *sql.Tx, initBlocks []bookkeeping.Block) error
- func BlockLatest(tx *sql.Tx) (basics.Round, error)
- func BlockNext(tx *sql.Tx) (basics.Round, error)
- func BlockPut(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) error
- func BlockPutStaging(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) (err error)
- func BlockResetDB(tx *sql.Tx) error
- func BlockStartCatchupStaging(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockAbortCatchup ¶
BlockAbortCatchup TODO: unused, either actually implement cleanup on catchpoint failure, or delete this
func BlockCompleteCatchup ¶
BlockCompleteCatchup applies catchpoint caught up blocks
func BlockEarliest ¶
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 ¶
BlockForgetBefore removes block entries with round numbers less than the specified round
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 ¶
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 ¶
BlockLatest returns the latest persisted 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 BlockStartCatchupStaging ¶
func BlockStartCatchupStaging(tx *sql.Tx, blk bookkeeping.Block, cert agreement.Certificate) error
BlockStartCatchupStaging initializes catchup for catchpoint
Types ¶
This section is empty.