export "unsafe_revoked_tx_signing" feature
[rust-lightning] / lightning / src / ln / channelmonitor.rs
index 28ca19fe0817617d06a5f457c8315de071e85bc7..1cb0070c8374eedc15c24026fd89194e1cf3c3a4 100644 (file)
@@ -1849,7 +1849,7 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
        /// Unsafe test-only version of get_latest_local_commitment_txn used by our test framework
        /// to bypass LocalCommitmentTransaction state update lockdown after signature and generate
        /// revoked commitment transaction.
-       #[cfg(test)]
+       #[cfg(any(test,feature = "unsafe_revoked_tx_signing"))]
        pub fn unsafe_get_latest_local_commitment_txn<L: Deref>(&mut self, logger: &L) -> Vec<Transaction> where L::Target: Logger {
                log_trace!(logger, "Getting signed copy of latest local commitment transaction!");
                if let Some(commitment_tx) = self.onchain_tx_handler.get_fully_signed_copy_local_tx(&self.funding_redeemscript) {