Skip to content

Commit

Permalink
Demonstrate mutating functions which are not fully test-covered
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Jan 19, 2020
1 parent 17e2afa commit 2580372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
}
}

#[cfg_attr(all(test, feature = "mutation_testing"), mutate)]
/// Removes any uncommitted HTLCs, to be used on peer disconnection, including any pending
/// HTLCs that we intended to add but haven't as we were waiting on a remote revoke.
/// Returns the set of PendingHTLCStatuses from remote uncommitted HTLCs (which we're
Expand Down Expand Up @@ -2286,6 +2287,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
self.channel_state |= ChannelState::MonitorUpdateFailed as u32;
}

#[cfg_attr(all(test, feature = "mutation_testing"), mutate)]
/// Indicates that the latest ChannelMonitor update has been committed by the client
/// successfully and we should restore normal operation. Returns messages which should be sent
/// to the remote side.
Expand Down

0 comments on commit 2580372

Please sign in to comment.