Skip to content

Commit 3bbea96

Browse files
committed
f minor nits
1 parent 0c26481 commit 3bbea96

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lightning/src/ln/channelmanager.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
20752075
Some(id) => id.clone(),
20762076
};
20772077

2078-
macro_rules! insert_payment_id {
2078+
macro_rules! insert_outbound_payment {
20792079
() => {
20802080
let payment = payment_entry.or_insert_with(|| PendingOutboundPayment::Retryable {
20812081
session_privs: HashSet::new(),
@@ -2109,7 +2109,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
21092109
payee: payee.clone(),
21102110
}, onion_packet, &self.logger),
21112111
channel_state, chan)
2112-
21132112
} {
21142113
Some((update_add, commitment_signed, monitor_update)) => {
21152114
if let Err(e) = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update) {
@@ -2119,10 +2118,10 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
21192118
// is restored. Therefore, we must return an error indicating that
21202119
// it is unsafe to retry the payment wholesale, which we do in the
21212120
// send_payment check for MonitorUpdateFailed, below.
2122-
insert_payment_id!(); // Only do this after possibly break'ing on Perm failure above.
2121+
insert_outbound_payment!(); // Only do this after possibly break'ing on Perm failure above.
21232122
return Err(APIError::MonitorUpdateFailed);
21242123
}
2125-
insert_payment_id!();
2124+
insert_outbound_payment!();
21262125

21272126
log_debug!(self.logger, "Sending payment along path resulted in a commitment_signed for channel {}", log_bytes!(chan.get().channel_id()));
21282127
channel_state.pending_msg_events.push(events::MessageSendEvent::UpdateHTLCs {
@@ -2137,7 +2136,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
21372136
},
21382137
});
21392138
},
2140-
None => { insert_payment_id!(); },
2139+
None => { insert_outbound_payment!(); },
21412140
}
21422141
} else { unreachable!(); }
21432142
return Ok(());

0 commit comments

Comments
 (0)