Skip to content

Commit e0c032e

Browse files
committed
Improve Route::get_total_amount docs
1 parent fe812bc commit e0c032e

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
@@ -355,8 +355,12 @@ impl Route {
355355
overpaid_value_msat + self.paths.iter().map(|path| path.fee_msat()).sum::<u64>()
356356
}
357357

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

0 commit comments

Comments
 (0)