pub struct FullTxOut<A> {
pub chain_position: ChainPosition<A>,
pub outpoint: OutPoint,
pub txout: TxOut,
pub spent_by: Option<(ChainPosition<A>, Txid)>,
pub is_on_coinbase: bool,
}
Expand description
A TxOut
with as much data as we can retrieve about it
Fields§
§chain_position: ChainPosition<A>
The position of the transaction in outpoint
in the overall chain.
outpoint: OutPoint
The location of the TxOut
.
txout: TxOut
The TxOut
.
spent_by: Option<(ChainPosition<A>, Txid)>
The txid and chain position of the transaction (if any) that has spent this output.
is_on_coinbase: bool
Whether this output is on a coinbase transaction.
Implementations§
Source§impl<A: Anchor> FullTxOut<A>
impl<A: Anchor> FullTxOut<A>
Sourcepub fn is_mature(&self, tip: u32) -> bool
pub fn is_mature(&self, tip: u32) -> bool
Whether the txout
is considered mature.
Depending on the implementation of confirmation_height_upper_bound
in Anchor
, this
method may return false-negatives. In other words, interpreted confirmation count may be
less than the actual value.
Sourcepub fn is_confirmed_and_spendable(&self, tip: u32) -> bool
pub fn is_confirmed_and_spendable(&self, tip: u32) -> bool
Whether the utxo is/was/will be spendable with chain tip
.
This method does not take into account the lock time.
Depending on the implementation of confirmation_height_upper_bound
in Anchor
, this
method may return false-negatives. In other words, interpreted confirmation count may be
less than the actual value.