File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ pub(crate) trait RoutePath {
84
84
}
85
85
impl RoutePath for Vec < RouteHop > {
86
86
fn get_path_fees ( & self ) -> u64 {
87
+ // Do not count last hop of each path since that's the full value of the payment
87
88
self . split_last ( ) . map ( |( _, path_prefix) | path_prefix) . unwrap_or ( & [ ] )
88
89
. iter ( ) . map ( |hop| & hop. fee_msat )
89
90
. sum ( )
@@ -96,7 +97,6 @@ impl Route {
96
97
/// This doesn't include any extra payment made to the recipient, which can happen in excess of
97
98
/// the amount passed to [`find_route`]'s `params.final_value_msat`.
98
99
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
100
100
self . paths . iter ( ) . map ( |path| path. get_path_fees ( ) ) . sum ( )
101
101
}
102
102
You can’t perform that action at this time.
0 commit comments