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,
}
}
+ #[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
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.
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);