Run with mutagen on travis.
[rust-lightning] / lightning / src / ln / channel.rs
index c9eebf41eb4706b3a7d39c10600c92e7c8e8949e..262342d41d3c633b362f4660e65bd5c8685f3893 100644 (file)
@@ -35,6 +35,9 @@ use std::default::Default;
 use std::{cmp,mem,fmt};
 use std::ops::Deref;
 
+#[cfg(all(test, feature = "mutation_testing"))]
+use mutagen::mutate;
+
 #[cfg(test)]
 pub struct ChannelValueStat {
        pub value_to_self_msat: u64,
@@ -2513,6 +2516,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
                Ok(())
        }
 
+       #[cfg_attr(all(test, feature = "mutation_testing"), mutate)]
        fn get_last_revoke_and_ack(&self) -> msgs::RevokeAndACK {
                let next_per_commitment_point = PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number));
                let per_commitment_secret = chan_utils::build_commitment_secret(self.local_keys.commitment_seed(), self.cur_local_commitment_transaction_number + 2);