Skip to content

Commit 5e8193f

Browse files
committed
f more concice, i guess?
1 parent 7180113 commit 5e8193f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lightning/src/ln/channel.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -5504,11 +5504,14 @@ impl<Signer: Sign> Channel<Signer> {
55045504
pub fn queue_add_htlc<L: Deref>(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
55055505
onion_routing_packet: msgs::OnionPacket, logger: &L)
55065506
-> Result<(), ChannelError> where L::Target: Logger {
5507-
let res = self
5507+
self
55085508
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true, logger)
5509-
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"));
5510-
if let Err(e) = &res { if let ChannelError::Ignore(_) = e {} else { debug_assert!(false, "Queueing cannot trigger channel failure"); } }
5511-
res
5509+
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
5510+
.map_err(|err| {
5511+
if let ChannelError::Ignore(_) = err { /* fine */ }
5512+
else { debug_assert!(false, "Queueing cannot trigger channel failure"); }
5513+
err
5514+
})
55125515
}
55135516

55145517
/// Adds a pending outbound HTLC to this channel, note that you probably want

0 commit comments

Comments
 (0)