From: Elias Rohrer Date: Wed, 6 Sep 2023 09:26:13 +0000 (+0200) Subject: Improve `Route::get_total_amount` docs X-Git-Tag: v0.0.117-alpha1~27^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=543674f1dac007586be8c94ae73af1ca82b5e095;p=rust-lightning Improve `Route::get_total_amount` docs --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 10bdd69b5..9c5fe8e1f 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -359,8 +359,12 @@ impl Route { overpaid_value_msat + self.paths.iter().map(|path| path.fee_msat()).sum::() } - /// Returns the total amount paid on this [`Route`], excluding the fees. Might be more than - /// requested if we had to reach htlc_minimum_msat. + /// Returns the total amount paid on this [`Route`], excluding the fees. + /// + /// Might be more than requested as part of the given [`RouteParameters::final_value_msat`] if + /// we had to reach the [`htlc_minimum_msat`] limits. + /// + /// [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message pub fn get_total_amount(&self) -> u64 { self.paths.iter().map(|path| path.final_value_msat()).sum() }