Skip to content

Commit b092157

Browse files
committed
Improve Route::get_total_amount docs
1 parent bf96d2e commit b092157

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

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

0 commit comments

Comments
 (0)