Skip to content

Commit 65d9d0f

Browse files
committed
f sanity check the doc claim
1 parent 67d3ac8 commit 65d9d0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lightning/src/ln/channel.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -5504,8 +5504,11 @@ 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-
self.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true, logger)
5508-
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
5507+
let res = self
5508+
.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
55095512
}
55105513

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

0 commit comments

Comments
 (0)