Skip to content

Commit ff5c999

Browse files
committed
Remove available flag in test signer
1 parent f1e11b7 commit ff5c999

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lightning/src/util/test_channel_signer.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ pub struct TestChannelSigner {
7171
/// Channel state used for policy enforcement
7272
pub state: Arc<Mutex<EnforcementState>>,
7373
pub disable_revocation_policy_check: bool,
74-
/// When `true` (the default), the signer will respond immediately with signatures. When `false`,
75-
/// the signer will return an error indicating that it is unavailable.
76-
pub available: Arc<Mutex<bool>>,
7774
}
7875

7976
/// Channel signer operations that can be individually enabled and disabled. If a particular value
@@ -135,7 +132,6 @@ impl TestChannelSigner {
135132
inner,
136133
state,
137134
disable_revocation_policy_check: false,
138-
available: Arc::new(Mutex::new(true)),
139135
}
140136
}
141137

@@ -149,7 +145,6 @@ impl TestChannelSigner {
149145
inner,
150146
state,
151147
disable_revocation_policy_check,
152-
available: Arc::new(Mutex::new(true)),
153148
}
154149
}
155150

@@ -162,13 +157,9 @@ impl TestChannelSigner {
162157

163158
/// Marks the signer's availability.
164159
///
165-
/// When `true`, methods are forwarded to the underlying signer as normal. When `false`, some
160+
/// When a certain mask is set to `true`, methods are forwarded to the underlying signer as normal. When `false`, some
166161
/// methods will return `Err` indicating that the signer is unavailable. Intended to be used for
167162
/// testing asynchronous signing.
168-
pub fn set_available(&self, available: bool) {
169-
*self.available.lock().unwrap() = available;
170-
}
171-
172163
#[cfg(test)]
173164
pub fn set_ops_available(&self, mask: u32, available: bool) {
174165
let mut state = self.get_enforcement_state();

0 commit comments

Comments
 (0)