pub trait ConnectedTx {
    type TOut: 'static + From<TxOut> + Send;

    // Required methods
    fn from(tx: &Transaction) -> Self;
    fn add_input(&mut self, input: Self::TOut);
    fn connect(
        tx: Transaction,
        tx_db: &TxDB,
        blk_index: &BlockIndex,
        blk_file: &BlkFile
    ) -> OpResult<Self>
       where Self: Sized;
}
Expand description

This type refer to Transaction structs where inputs are replaced by connected outputs.

Implementors:

  • STransaction
  • FTransaction

Required Associated Types§

source

type TOut: 'static + From<TxOut> + Send

Associated output type.

Required Methods§

source

fn from(tx: &Transaction) -> Self

Construct a ConnectedTx from Transaction without blank inputs.

This function is used in iter_connected.rs.

source

fn add_input(&mut self, input: Self::TOut)

Add a input to this ConnectedTx.

This function is used in iter_connected.rs.

source

fn connect( tx: Transaction, tx_db: &TxDB, blk_index: &BlockIndex, blk_file: &BlkFile ) -> OpResult<Self>where Self: Sized,

Build ConnectedTx from Tx, and attach inputs to this ConnectedTx using tx-index.

Implementors§