@@ -3974,14 +3974,18 @@ impl<Signer: Sign> Channel<Signer> {
3974
3974
3975
3975
/// Adds a pending outbound HTLC to this channel, note that you probably want
3976
3976
/// 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
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.
3984
- /// You MUST call send_commitment prior to any other calls on this Channel
3977
+ ///
3978
+ /// This returns an optional UpdateAddHTLC as we may be in a state where we cannot add HTLCs on
3979
+ /// the wire:
3980
+ /// * In cases where we're waiting on the remote peer to send us a revoke_and_ack, we
3981
+ /// wouldn't be able to determine what they actually ACK'ed if we have two sets of updates
3982
+ /// awaiting ACK.
3983
+ /// * In cases where we're marked MonitorUpdateFailed, we cannot commit to a new state as we
3984
+ /// may not yet have sent the previous commitment update messages and will need to regenerate
3985
+ /// them.
3986
+ ///
3987
+ /// You MUST call send_commitment prior to calling any other methods on this Channel!
3988
+ ///
3985
3989
/// If an Err is returned, it's a ChannelError::Ignore!
3986
3990
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 > {
3987
3991
if ( self . channel_state & ( ChannelState :: ChannelFunded as u32 | BOTH_SIDES_SHUTDOWN_MASK ) ) != ( ChannelState :: ChannelFunded as u32 ) {
0 commit comments