Trait bitcoin_explorer::parser::proto::connected_proto::ConnectedBlock
source · pub trait ConnectedBlock {
type Tx: ConnectedTx + Send;
// Required methods
fn from(block_header: BlockHeader, block_hash: BlockHash) -> Self;
fn add_tx(&mut self, tx: Self::Tx);
fn connect(
block: Block,
tx_db: &TxDB,
blk_index: &BlockIndex,
blk_file: &BlkFile
) -> OpResult<Self>
where Self: Sized;
}
Expand description
This type refer to Block
structs where inputs are
replaced by connected outputs.
Implementors:
- SConnectedBlock
- FConnectedBlock
Required Associated Types§
sourcetype Tx: ConnectedTx + Send
type Tx: ConnectedTx + Send
Associated output type.
Required Methods§
sourcefn from(block_header: BlockHeader, block_hash: BlockHash) -> Self
fn from(block_header: BlockHeader, block_hash: BlockHash) -> Self
Construct a ConnectedBlock from parts of a block.
Used in iter_connected.rs
.