pub trait TxIndex {
    // Required methods
    fn lookup_tx(&self, b: &Txid) -> Result<Arc<Transaction>, TxIndexError>;
    fn add_tx(&self, tx: Arc<Transaction>) -> Result<Txid, TxIndexError>;

    // Provided method
    fn lookup_output(&self, b: &OutPoint) -> Result<TxOut, TxIndexError> { ... }
}
Expand description

Generic interface for any txindex

Required Methods§

source

fn lookup_tx(&self, b: &Txid) -> Result<Arc<Transaction>, TxIndexError>

lookup a tx

source

fn add_tx(&self, tx: Arc<Transaction>) -> Result<Txid, TxIndexError>

locally add a tx for tracking

Provided Methods§

source

fn lookup_output(&self, b: &OutPoint) -> Result<TxOut, TxIndexError>

lookup a particular output

Implementors§

source§

impl TxIndex for TxIndexLogger

source§

impl<Cache, Primary> TxIndex for CachedTxIndex<Cache, Primary>
where Cache: TxIndex, Primary: TxIndex,