Skip to content

Commit 3ea35f8

Browse files
committed
Remove available flag in test signer
1 parent db16114 commit 3ea35f8

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lightning/src/util/test_channel_signer.rs

Lines changed: 0 additions & 14 deletions
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
/// Set of signer operations that are disabled. If an operation is disabled,
7875
/// the signer will return `Err` when the corresponding method is called.
7976
pub disabled_signer_ops: HashSet<SignerOp>,
@@ -130,7 +127,6 @@ impl TestChannelSigner {
130127
inner,
131128
state,
132129
disable_revocation_policy_check: false,
133-
available: Arc::new(Mutex::new(true)),
134130
disabled_signer_ops: HashSet::new(),
135131
}
136132
}
@@ -145,7 +141,6 @@ impl TestChannelSigner {
145141
inner,
146142
state,
147143
disable_revocation_policy_check,
148-
available: Arc::new(Mutex::new(true)),
149144
disabled_signer_ops: HashSet::new(),
150145
}
151146
}
@@ -157,15 +152,6 @@ impl TestChannelSigner {
157152
self.state.lock().unwrap()
158153
}
159154

160-
/// Marks the signer's availability.
161-
///
162-
/// When `true`, methods are forwarded to the underlying signer as normal. When `false`, some
163-
/// methods will return `Err` indicating that the signer is unavailable. Intended to be used for
164-
/// testing asynchronous signing.
165-
pub fn set_available(&self, available: bool) {
166-
*self.available.lock().unwrap() = available;
167-
}
168-
169155
pub fn enable_op(&mut self, signer_op: SignerOp) {
170156
self.disabled_signer_ops.remove(&signer_op);
171157
}

0 commit comments

Comments
 (0)