Demonstrate mutating functions which are not fully test-covered
authorMatt Corallo <git@bluematt.me>
Sun, 19 Jan 2020 05:13:13 +0000 (00:13 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 25 May 2020 19:36:58 +0000 (15:36 -0400)
lightning/src/ln/channel.rs

index 262342d41d3c633b362f4660e65bd5c8685f3893..65fb9919760e94e7fd65e07fb31b02dcc2cb72e9 100644 (file)
@@ -2360,6 +2360,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
@@ -2446,6 +2447,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.