Skip to content

Commit 9d9860f

Browse files
committed
Some changes in comments and error messages.
1 parent 6850d83 commit 9d9860f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ln/channel.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ impl Channel {
15411541
Ok(())
15421542
}
15431543

1544-
/// Removes an outbound HTLC which has been commitment_signed by the remote end
1544+
/// Marks an outbound HTLC which we have received update_fail/fulfill/malformed
15451545
#[inline]
15461546
fn mark_outbound_htlc_removed(&mut self, htlc_id: u64, check_preimage: Option<[u8; 32]>, fail_reason: Option<HTLCFailReason>) -> Result<&HTLCSource, ChannelError> {
15471547
for htlc in self.pending_outbound_htlcs.iter_mut() {
@@ -1555,13 +1555,13 @@ impl Channel {
15551555
};
15561556
match htlc.state {
15571557
OutboundHTLCState::LocalAnnounced =>
1558-
return Err(ChannelError::Close("Remote tried to fulfill HTLC before it had been committed")),
1558+
return Err(ChannelError::Close("Remote tried to fulfill/fail HTLC before it had been committed")),
15591559
OutboundHTLCState::Committed => {
15601560
htlc.state = OutboundHTLCState::RemoteRemoved;
15611561
htlc.fail_reason = fail_reason;
15621562
},
15631563
OutboundHTLCState::AwaitingRemoteRevokeToRemove | OutboundHTLCState::AwaitingRemovedRemoteRevoke | OutboundHTLCState::RemoteRemoved =>
1564-
return Err(ChannelError::Close("Remote tried to fulfill HTLC that they'd already fulfilled")),
1564+
return Err(ChannelError::Close("Remote tried to fulfill/fail HTLC that they'd already fulfilled/failed")),
15651565
}
15661566
return Ok(&htlc.source);
15671567
}

0 commit comments

Comments
 (0)