From: Matt Corallo Date: Sun, 19 Jan 2020 05:13:13 +0000 (-0500) Subject: Demonstrate mutating functions which are not fully test-covered X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=8bcb652f58da082370cde514d2ba0d855bfcc4f9;p=rust-lightning Demonstrate mutating functions which are not fully test-covered --- 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.