23
23
//!
24
24
//! * [`list_canonical_txs`](TxGraph::list_canonical_txs) lists canonical transactions.
25
25
//! * [`filter_chain_txouts`](TxGraph::filter_chain_txouts) filters out canonical outputs from a
26
- //! list of outpoints.
26
+ //! list of outpoints.
27
27
//! * [`filter_chain_unspents`](TxGraph::filter_chain_unspents) filters out canonical unspent
28
- //! outputs from a list of outpoints.
28
+ //! outputs from a list of outpoints.
29
29
//! * [`balance`](TxGraph::balance) gets the total sum of unspent outputs filtered from a list of
30
- //! outpoints.
30
+ //! outpoints.
31
31
//! * [`canonical_iter`](TxGraph::canonical_iter) returns the [`CanonicalIter`] which contains all
32
- //! of the canonicalization logic.
32
+ //! of the canonicalization logic.
33
33
//!
34
34
//! All these methods require a `chain` and `chain_tip` argument. The `chain` must be a
35
35
//! [`ChainOracle`] implementation (such as [`LocalChain`](crate::local_chain::LocalChain)) which
39
39
//! transactions have precedence over others:
40
40
//!
41
41
//! * [`Anchor`] - This bit of data represents that a transaction is anchored in a given block. If
42
- //! the transaction is anchored in chain of `chain_tip`, or is an ancestor of a transaction
43
- //! anchored in chain of `chain_tip`, then the transaction must be canonical.
42
+ //! the transaction is anchored in chain of `chain_tip`, or is an ancestor of a transaction
43
+ //! anchored in chain of `chain_tip`, then the transaction must be canonical.
44
44
//! * `last_seen` - This is the timestamp of when a transaction is last-seen in the mempool. This
45
- //! value is updated by [`insert_seen_at`](TxGraph::insert_seen_at) and
46
- //! [`apply_update`](TxGraph::apply_update). Transactions that are seen later have higher
47
- //! priority than those that are seen earlier. `last_seen` values are transitive. This means
48
- //! that the actual `last_seen` value of a transaction is the max of all the `last_seen` values
49
- //! from it's descendants.
45
+ //! value is updated by [`insert_seen_at`](TxGraph::insert_seen_at) and
46
+ //! [`apply_update`](TxGraph::apply_update). Transactions that are seen later have higher
47
+ //! priority than those that are seen earlier. `last_seen` values are transitive. This means
48
+ //! that the actual `last_seen` value of a transaction is the max of all the `last_seen` values
49
+ //! from it's descendants.
50
50
//! * `last_evicted` - This is the timestamp of when a transaction last went missing from the
51
- //! mempool. If this value is equal to or higher than the transaction's `last_seen` value, then
52
- //! it will not be considered canonical.
51
+ //! mempool. If this value is equal to or higher than the transaction's `last_seen` value, then
52
+ //! it will not be considered canonical.
53
53
//!
54
54
//! # Graph traversal
55
55
//!
@@ -490,7 +490,7 @@ impl<A: Clone + Ord> TxGraph<A> {
490
490
/// The supplied closure takes in two inputs `(depth, ancestor_tx)`:
491
491
///
492
492
/// * `depth` is the distance between the starting `Transaction` and the `ancestor_tx`. I.e., if
493
- /// the `Transaction` is spending an output of the `ancestor_tx` then `depth` will be 1.
493
+ /// the `Transaction` is spending an output of the `ancestor_tx` then `depth` will be 1.
494
494
/// * `ancestor_tx` is the `Transaction`'s ancestor which we are considering to walk.
495
495
///
496
496
/// The supplied closure returns an `Option<T>`, allowing the caller to map each `Transaction`
@@ -508,7 +508,7 @@ impl<A: Clone + Ord> TxGraph<A> {
508
508
/// The supplied closure takes in two inputs `(depth, descendant_txid)`:
509
509
///
510
510
/// * `depth` is the distance between the starting `txid` and the `descendant_txid`. I.e., if the
511
- /// descendant is spending an output of the starting `txid` then `depth` will be 1.
511
+ /// descendant is spending an output of the starting `txid` then `depth` will be 1.
512
512
/// * `descendant_txid` is the descendant's txid which we are considering to walk.
513
513
///
514
514
/// The supplied closure returns an `Option<T>`, allowing the caller to map each node it visits
@@ -648,7 +648,7 @@ impl<A: Anchor> TxGraph<A> {
648
648
/// * A non-empty witness has precedence over an empty witness.
649
649
/// * A smaller witness has precedence over a larger witness.
650
650
/// * If the witness sizes are the same, we prioritize the two witnesses with lexicographical
651
- /// order.
651
+ /// order.
652
652
pub fn insert_tx < T : Into < Arc < Transaction > > > ( & mut self , tx : T ) -> ChangeSet < A > {
653
653
// This returns `Some` only if the merged tx is different to the `original_tx`.
654
654
fn _merge_tx_witnesses (
0 commit comments