@@ -79,6 +79,8 @@ use std::time::{SystemTime, UNIX_EPOCH};
79
79
use bitcoin:: psbt:: Psbt ;
80
80
use bitcoin:: Sequence ;
81
81
82
+ use super :: test_channel_signer:: SignerOp ;
83
+
82
84
pub fn pubkey ( byte : u8 ) -> PublicKey {
83
85
let secp_ctx = Secp256k1 :: new ( ) ;
84
86
PublicKey :: from_secret_key ( & secp_ctx, & privkey ( byte) )
@@ -1214,8 +1216,8 @@ pub struct TestKeysInterface {
1214
1216
pub disable_revocation_policy_check : bool ,
1215
1217
enforcement_states : Mutex < HashMap < [ u8 ; 32 ] , Arc < Mutex < EnforcementState > > > > ,
1216
1218
expectations : Mutex < Option < VecDeque < OnGetShutdownScriptpubkey > > > ,
1217
- /// Holds a signer ops mask to disable for the next signer created by this interface.
1218
- pub disable_next_signer_ops : Mutex < Option < u32 > > ,
1219
+ /// Holds a list of signer ops to disable for the next signer created by this interface.
1220
+ pub disable_next_signer_ops : Mutex < Vec < SignerOp > > ,
1219
1221
}
1220
1222
1221
1223
impl EntropySource for TestKeysInterface {
@@ -1276,8 +1278,8 @@ impl SignerProvider for TestKeysInterface {
1276
1278
let state = self . make_enforcement_state_cell ( keys. commitment_seed ) ;
1277
1279
let mut signer = TestChannelSigner :: new_with_revoked ( keys, state, self . disable_revocation_policy_check ) ;
1278
1280
#[ cfg( test) ]
1279
- if let Some ( mask ) = self . disable_next_signer_ops . lock ( ) . unwrap ( ) . take ( ) {
1280
- signer. disable_ops ( mask )
1281
+ for op in self . disable_next_signer_ops . lock ( ) . unwrap ( ) . drain ( .. ) {
1282
+ signer. disable_op ( op )
1281
1283
}
1282
1284
signer
1283
1285
}
@@ -1317,7 +1319,7 @@ impl TestKeysInterface {
1317
1319
disable_revocation_policy_check : false ,
1318
1320
enforcement_states : Mutex :: new ( new_hash_map ( ) ) ,
1319
1321
expectations : Mutex :: new ( None ) ,
1320
- disable_next_signer_ops : Mutex :: new ( None ) ,
1322
+ disable_next_signer_ops : Mutex :: new ( vec ! [ ] ) ,
1321
1323
}
1322
1324
}
1323
1325
0 commit comments