]> git.bitcoin.ninja Git - rust-lightning/commitdiff
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, 3 Feb 2020 02:38:54 +0000 (21:38 -0500)
lightning/src/ln/channel.rs

index 0af1b1fe2282a3e1bf5b8ae11ce3e1cd33ec2609..a4d8b89d1f51c941f7c06eec62a0647540d81c94 100644 (file)
@@ -2218,6 +2218,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
@@ -2304,6 +2305,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.