X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Ftest_channel_signer.rs;h=884acc2c2eac1835ca07f6949afd172effe2e62e;hb=f45a840c47a36d4fddc547c0f727799eae65e661;hp=5f509f7752dc3523002bd3b4e9ceb5ad08021c9e;hpb=1fb2b8e0ffdd0d50a60480ee8f71e0266ac06373;p=rust-lightning diff --git a/lightning/src/util/test_channel_signer.rs b/lightning/src/util/test_channel_signer.rs index 5f509f77..884acc2c 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>, /// Set of signer operations that are disabled. If an operation is disabled, /// the signer will return `Err` when the corresponding method is called. pub disabled_signer_ops: Arc>>, @@ -130,7 +127,6 @@ impl TestChannelSigner { inner, state, disable_revocation_policy_check: false, - available: Arc::new(Mutex::new(true)), disabled_signer_ops: Arc::new(Mutex::new(new_hash_set())), } } @@ -145,7 +141,6 @@ impl TestChannelSigner { inner, state, disable_revocation_policy_check, - available: Arc::new(Mutex::new(true)), disabled_signer_ops: Arc::new(Mutex::new(new_hash_set())), } } @@ -157,15 +152,6 @@ impl TestChannelSigner { self.state.lock().unwrap() } - /// Marks the signer's availability. - /// - /// When `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; - } - pub fn enable_op(&mut self, signer_op: SignerOp) { self.disabled_signer_ops.lock().unwrap().remove(&signer_op); }