@@ -76,6 +76,7 @@ use bitcoin::secp256k1::ecdsa::{RecoverableSignature, Signature};
7676use bitcoin:: secp256k1:: schnorr;
7777use bitcoin:: secp256k1:: { self , Message , PublicKey , Scalar , Secp256k1 , SecretKey } ;
7878
79+ use lightning:: util:: dyn_signer:: DynSigner ;
7980use std:: cell:: RefCell ;
8081use std:: cmp;
8182use std:: sync:: atomic:: { AtomicBool , AtomicU64 , AtomicUsize , Ordering } ;
@@ -444,7 +445,7 @@ impl SignerProvider for KeyProvider {
444445 let ctr = channel_keys_id[ 0 ] ;
445446 let ( inbound, state) = self . signer_state . borrow ( ) . get ( & ctr) . unwrap ( ) . clone ( ) ;
446447 TestChannelSigner :: new_with_revoked (
447- if inbound {
448+ DynSigner :: new ( if inbound {
448449 InMemorySigner :: new (
449450 & secp_ctx,
450451 SecretKey :: from_slice ( & [
@@ -516,7 +517,7 @@ impl SignerProvider for KeyProvider {
516517 channel_keys_id,
517518 channel_keys_id,
518519 )
519- } ,
520+ } ) ,
520521 state,
521522 false ,
522523 )
@@ -525,6 +526,7 @@ impl SignerProvider for KeyProvider {
525526 fn read_chan_signer ( & self , mut data : & [ u8 ] ) -> Result < TestChannelSigner , DecodeError > {
526527 let inner: InMemorySigner = ReadableArgs :: read ( & mut data, self ) ?;
527528 let state = Arc :: new ( Mutex :: new ( EnforcementState :: new ( ) ) ) ;
529+ let inner = DynSigner :: new ( inner) ;
528530
529531 Ok ( TestChannelSigner :: new_with_revoked ( inner, state, false ) )
530532 }
0 commit comments