@@ -484,47 +484,6 @@ impl<'a, 'b, 'c> Node<'a, 'b, 'c> {
484484 pub fn get_block_header ( & self , height : u32 ) -> Header {
485485 self . blocks . lock ( ) . unwrap ( ) [ height as usize ] . 0 . header
486486 }
487- /// Changes the channel signer's availability for the specified peer and channel.
488- ///
489- /// When `available` is set to `true`, the channel signer will behave normally. When set to
490- /// `false`, the channel signer will act like an off-line remote signer and will return `Err` for
491- /// several of the signing methods. Currently, only `get_per_commitment_point` and
492- /// `release_commitment_secret` are affected by this setting.
493- #[ cfg( test) ]
494- pub fn set_channel_signer_available ( & self , peer_id : & PublicKey , chan_id : & ChannelId , available : bool ) {
495- use crate :: sign:: ChannelSigner ;
496- log_debug ! ( self . logger, "Setting channel signer for {} as available={}" , chan_id, available) ;
497-
498- let per_peer_state = self . node . per_peer_state . read ( ) . unwrap ( ) ;
499- let chan_lock = per_peer_state. get ( peer_id) . unwrap ( ) . lock ( ) . unwrap ( ) ;
500-
501- let mut channel_keys_id = None ;
502- if let Some ( chan) = chan_lock. channel_by_id . get ( chan_id) . map ( |phase| phase. context ( ) ) {
503- chan. get_signer ( ) . as_ecdsa ( ) . unwrap ( ) . set_available ( available) ;
504- channel_keys_id = Some ( chan. channel_keys_id ) ;
505- }
506-
507- let mut monitor = None ;
508- for ( funding_txo, channel_id) in self . chain_monitor . chain_monitor . list_monitors ( ) {
509- if * chan_id == channel_id {
510- monitor = self . chain_monitor . chain_monitor . get_monitor ( funding_txo) . ok ( ) ;
511- }
512- }
513- if let Some ( monitor) = monitor {
514- monitor. do_signer_call ( |signer| {
515- channel_keys_id = channel_keys_id. or ( Some ( signer. inner . channel_keys_id ( ) ) ) ;
516- signer. set_available ( available)
517- } ) ;
518- }
519-
520- if available {
521- self . keys_manager . unavailable_signers . lock ( ) . unwrap ( )
522- . remove ( channel_keys_id. as_ref ( ) . unwrap ( ) ) ;
523- } else {
524- self . keys_manager . unavailable_signers . lock ( ) . unwrap ( )
525- . insert ( channel_keys_id. unwrap ( ) ) ;
526- }
527- }
528487
529488 /// Toggles this node's signer to be available for the given signer operation.
530489 /// This is useful for testing behavior for restoring an async signer that previously
0 commit comments