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/index.cgi?a=commitdiff_plain;h=741cffc04ca6ac638f858c8d16065a26e26a20d5;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 262342d41..65fb99197 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -2360,6 +2360,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 @@ -2446,6 +2447,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.