writer

package
v0.0.0-...-3979f71 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTransactionParticipation

func AddTransactionParticipation(block *types.Block, tx pgx.Tx) error

AddTransactionParticipation writes account participation info to the `txn_participation` table.

func AddTransactions

func AddTransactions(block *types.Block, modifiedTxns []types.SignedTxnInBlock, tx pgx.Tx) error

AddTransactions adds transactions from `block` to the database. `modifiedTxns` contains enhanced apply data generated by evaluator.

Types

type Writer

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

Writer is responsible for writing blocks and accounting state deltas to the database.

func MakeWriter

func MakeWriter(tx pgx.Tx) (Writer, error)

MakeWriter creates a Writer object.

func (*Writer) AddBlock

func (w *Writer) AddBlock(block *sdk.Block, delta sdk.LedgerStateDelta) error

AddBlock writes the block and accounting state deltas to the database, except for transactions and transaction participation. Those are imported by free functions in the writer/ directory.

func (*Writer) AddBlock0

func (w *Writer) AddBlock0(block *sdk.Block) error

AddBlock0 writes block 0 to the database.

func (*Writer) Close

func (w *Writer) Close()

Close shuts down Writer.

Jump to

Keyboard shortcuts

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