Run with mutagen on travis.
[rust-lightning] / lightning / src / ln / channel.rs
index b726b2375a65d6b473b3a263da455b7812d5ad52..b9feb36ddaf7f4a5be67f1dfc293690c450040cb 100644 (file)
@@ -37,6 +37,9 @@ use std::{cmp,mem,fmt};
 use std::sync::{Arc};
 use std::ops::Deref;
 
+#[cfg(all(test, feature = "mutation_testing"))]
+use mutagen::mutate;
+
 #[cfg(test)]
 pub struct ChannelValueStat {
        pub value_to_self_msat: u64,
@@ -2484,6 +2487,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);