From 8bcb652f58da082370cde514d2ba0d855bfcc4f9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 19 Jan 2020 00:13:13 -0500 Subject: [PATCH] Demonstrate mutating functions which are not fully test-covered --- lightning/src/ln/channel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 0af1b1fe2..a4d8b89d1 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -2218,6 +2218,7 @@ impl Channel { } } + #[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 @@ -2304,6 +2305,7 @@ impl Channel { 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. -- 2.39.5