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.
Trait Implementations§
source§impl<A: Ord> Ord for FullTxOut<A>
impl<A: Ord> Ord for FullTxOut<A>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<A: PartialEq> PartialEq for FullTxOut<A>
impl<A: PartialEq> PartialEq for FullTxOut<A>
source§impl<A: PartialOrd> PartialOrd for FullTxOut<A>
impl<A: PartialOrd> PartialOrd for FullTxOut<A>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more