Skip to content

Commit 7db7bab

Browse files
committed
f move comment
1 parent dd0d2a4 commit 7db7bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub(crate) trait RoutePath {
8484
}
8585
impl RoutePath for Vec<RouteHop> {
8686
fn get_path_fees(&self) -> u64 {
87+
// Do not count last hop of each path since that's the full value of the payment
8788
self.split_last().map(|(_, path_prefix)| path_prefix).unwrap_or(&[])
8889
.iter().map(|hop| &hop.fee_msat)
8990
.sum()
@@ -96,7 +97,6 @@ impl Route {
9697
/// This doesn't include any extra payment made to the recipient, which can happen in excess of
9798
/// the amount passed to [`find_route`]'s `params.final_value_msat`.
9899
pub fn get_total_fees(&self) -> u64 {
99-
// Do not count last hop of each path since that's the full value of the payment
100100
self.paths.iter().map(|path| path.get_path_fees()).sum()
101101
}
102102

0 commit comments

Comments
 (0)