Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State interface { djtx.UTXOState djtx.StatusState djtx.SingletonState TxState }
State persistently maintains a set of UTXOs, transaction, statuses, and singletons.
func New ¶
func New(db database.Database, parser txs.Parser, metrics prometheus.Registerer) (State, error)
type TxState ¶
type TxState interface { // Tx attempts to load a transaction from storage. GetTx(txID ids.ID) (*txs.Tx, error) // PutTx saves the provided transaction to storage. PutTx(txID ids.ID, tx *txs.Tx) error // DeleteTx removes the provided transaction from storage. DeleteTx(txID ids.ID) error }
TxState is a thin wrapper around a database to provide, caching, serialization, and de-serialization of transactions.
func NewTxState ¶
func NewTxState(db database.Database, parser txs.Parser, metrics prometheus.Registerer) (TxState, error)
Click to show internal directories.
Click to hide internal directories.