Skip to content

Commit 543674f

Browse files
committed
Improve Route::get_total_amount docs
1 parent 6082b57 commit 543674f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lightning/src/routing/router.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,12 @@ impl Route {
359359
overpaid_value_msat + self.paths.iter().map(|path| path.fee_msat()).sum::<u64>()
360360
}
361361

362-
/// Returns the total amount paid on this [`Route`], excluding the fees. Might be more than
363-
/// requested if we had to reach htlc_minimum_msat.
362+
/// Returns the total amount paid on this [`Route`], excluding the fees.
363+
///
364+
/// Might be more than requested as part of the given [`RouteParameters::final_value_msat`] if
365+
/// we had to reach the [`htlc_minimum_msat`] limits.
366+
///
367+
/// [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
364368
pub fn get_total_amount(&self) -> u64 {
365369
self.paths.iter().map(|path| path.final_value_msat()).sum()
366370
}

0 commit comments

Comments
 (0)