Skip to content

Commit 4eef20d

Browse files
f nits
1 parent d9b4ea2 commit 4eef20d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lightning/src/routing/router.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,12 @@ impl Path {
293293
pub fn fee_msat(&self) -> u64 {
294294
match &self.blinded_tail {
295295
Some(_) => self.hops.iter().map(|hop| hop.fee_msat).sum::<u64>(),
296-
None =>
296+
None => {
297297
// Do not count last hop of each path since that's the full value of the payment
298298
self.hops.split_last().map_or(0,
299299
|(_, path_prefix)| path_prefix.iter().map(|hop| hop.fee_msat).sum())
300300
}
301+
}
301302
}
302303

303304
/// Gets the total amount paid on this [`Path`], excluding the fees.

lightning/src/util/macro_logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl<'a> core::fmt::Display for DebugRoute<'a> {
6666
for (idx, p) in self.0.paths.iter().enumerate() {
6767
writeln!(f, "path {}:", idx)?;
6868
for h in p.hops.iter() {
69-
writeln!(f, " node_id: {}, short_channel_id: {}, fee_msat: {}, cltv_expiry_delta: {},", log_pubkey!(h.pubkey), h.short_channel_id, h.fee_msat, h.cltv_expiry_delta)?;
69+
writeln!(f, " node_id: {}, short_channel_id: {}, fee_msat: {}, cltv_expiry_delta: {}", log_pubkey!(h.pubkey), h.short_channel_id, h.fee_msat, h.cltv_expiry_delta)?;
7070
}
7171
writeln!(f, " blinded_tail: {:?}", p.blinded_tail)?;
7272
}

0 commit comments

Comments
 (0)