From ff5c999c8f5b6b6dda5384aa4dff1a1f7fcb026e Mon Sep 17 00:00:00 2001 From: Alec Chen Date: Mon, 10 Jun 2024 17:57:45 -0700 Subject: [PATCH] Remove available flag in test signer --- lightning/src/util/test_channel_signer.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lightning/src/util/test_channel_signer.rs b/lightning/src/util/test_channel_signer.rs index 695c9399ff..96e4f6dbb8 100644 --- a/lightning/src/util/test_channel_signer.rs +++ b/lightning/src/util/test_channel_signer.rs @@ -71,9 +71,6 @@ pub struct TestChannelSigner { /// Channel state used for policy enforcement pub state: Arc>, pub disable_revocation_policy_check: bool, - /// When `true` (the default), the signer will respond immediately with signatures. When `false`, - /// the signer will return an error indicating that it is unavailable. - pub available: Arc>, } /// Channel signer operations that can be individually enabled and disabled. If a particular value @@ -135,7 +132,6 @@ impl TestChannelSigner { inner, state, disable_revocation_policy_check: false, - available: Arc::new(Mutex::new(true)), } } @@ -149,7 +145,6 @@ impl TestChannelSigner { inner, state, disable_revocation_policy_check, - available: Arc::new(Mutex::new(true)), } } @@ -162,13 +157,9 @@ impl TestChannelSigner { /// Marks the signer's availability. /// - /// When `true`, methods are forwarded to the underlying signer as normal. When `false`, some + /// When a certain mask is set to `true`, methods are forwarded to the underlying signer as normal. When `false`, some /// methods will return `Err` indicating that the signer is unavailable. Intended to be used for /// testing asynchronous signing. - pub fn set_available(&self, available: bool) { - *self.available.lock().unwrap() = available; - } - #[cfg(test)] pub fn set_ops_available(&self, mask: u32, available: bool) { let mut state = self.get_enforcement_state();