@@ -431,10 +431,17 @@ impl<D> Wallet<D> {
431431 . next ( )
432432 }
433433
434- /// Inserts the given foreign `TxOut` at `OutPoint` into the wallet's transaction graph. Any
435- /// inserted foreign TxOuts are not persisted until [`Self::commit`] is called.
434+ /// Inserts a [`TxOut`] at [`OutPoint`] into the wallet's transaction graph.
435+ /// Any inserted TxOuts are not persisted until [`commit`] is called.
436+ ///
437+ /// This can be used to add a `TxOut` that the wallet doesn't own but is used as an input to
438+ /// a [`Transaction`] passed to the [`calculate_fee`] or [`calculate_fee_rate`] functions.
436439 ///
437440 /// Only insert TxOuts you trust the values for!
441+ ///
442+ /// [`calculate_fee`]: Self::calculate_fee
443+ /// [`calculate_fee_rate`]: Self::calculate_fee_rate
444+ /// [`commit`]: Self::commit
438445 pub fn insert_txout ( & mut self , outpoint : OutPoint , txout : TxOut )
439446 where
440447 D : PersistBackend < ChangeSet > ,
@@ -445,9 +452,8 @@ impl<D> Wallet<D> {
445452
446453 /// Calculates the fee of a given transaction. Returns 0 if `tx` is a coinbase transaction.
447454 ///
448- /// To calculate the fee for a [`Transaction`] that depends on foreign [`TxOut`] values you must
449- /// first manually insert the foreign TxOuts into the tx graph using the [`insert_txout`] function.
450- /// Only insert TxOuts you trust the values for!
455+ /// To calculate the fee for a [`Transaction`] with inputs not owned by this wallet you must
456+ /// manually insert the TxOut(s) into the tx graph using the [`insert_txout`] function.
451457 ///
452458 /// Note `tx` does not have to be in the graph for this to work.
453459 ///
@@ -458,9 +464,8 @@ impl<D> Wallet<D> {
458464
459465 /// Calculate the [`FeeRate`] for a given transaction.
460466 ///
461- /// To calculate the fee rate for a [`Transaction`] that depends on foreign [`TxOut`] values you
462- /// must first manually insert the foreign TxOuts into the tx graph using the [`insert_txout`] function.
463- /// Only insert TxOuts you trust the values for!
467+ /// To calculate the fee rate for a [`Transaction`] with inputs not owned by this wallet you must
468+ /// manually insert the TxOut(s) into the tx graph using the [`insert_txout`] function.
464469 ///
465470 /// Note `tx` does not have to be in the graph for this to work.
466471 ///
@@ -1073,6 +1078,8 @@ impl<D> Wallet<D> {
10731078 /// *replace by fee* (RBF). If the transaction can be fee bumped then it returns a [`TxBuilder`]
10741079 /// pre-populated with the inputs and outputs of the original transaction.
10751080 ///
1081+ ///
1082+ ///
10761083 /// ## Example
10771084 ///
10781085 /// ```no_run
0 commit comments