Trait bitcoin_explorer::parser::proto::connected_proto::ConnectedTx
source · 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§
Required Methods§
sourcefn from(tx: &Transaction) -> Self
fn from(tx: &Transaction) -> Self
Construct a ConnectedTx from Transaction without blank inputs.
This function is used in iter_connected.rs
.
sourcefn add_input(&mut self, input: Self::TOut)
fn add_input(&mut self, input: Self::TOut)
Add a input to this ConnectedTx.
This function is used in iter_connected.rs
.
sourcefn connect(
tx: Transaction,
tx_db: &TxDB,
blk_index: &BlockIndex,
blk_file: &BlkFile
) -> OpResult<Self>where
Self: Sized,
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.