Skip to content

Commit 8671aca

Browse files
committed
f tweak send_htlc docs to describe new failure conditions
1 parent c0e4cf3 commit 8671aca

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,9 +3974,13 @@ impl<Signer: Sign> Channel<Signer> {
39743974

39753975
/// Adds a pending outbound HTLC to this channel, note that you probably want
39763976
/// send_htlc_and_commit instead cause you'll want both messages at once.
3977-
/// This returns an option instead of a pure UpdateAddHTLC as we may be in a state where we are
3978-
/// waiting on the remote peer to send us a revoke_and_ack during which time we cannot add new
3979-
/// HTLCs on the wire or we wouldn't be able to determine what they actually ACK'ed.
3977+
/// This returns an option instead of a pure UpdateAddHTLC as we may be in a state where we
3978+
/// cannot add HTLCs on the wire.
3979+
/// In cases where we're waiting on the remote peer to send us a revoke_and_ack, if we did, we
3980+
/// wouldn't be able to determine what they actually ACK'ed when we do receive the
3981+
/// revoke_and_ack.
3982+
/// In cases where we're marked MonitorUpdateFailed, we cannot commit to a new state as we may
3983+
/// not yet have sent the previous commitment update messages and will need to regenerate them.
39803984
/// You MUST call send_commitment prior to any other calls on this Channel
39813985
/// If an Err is returned, it's a ChannelError::Ignore!
39823986
pub fn send_htlc(&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource, onion_routing_packet: msgs::OnionPacket) -> Result<Option<msgs::UpdateAddHTLC>, ChannelError> {

0 commit comments

Comments
 (0)