-pub struct TestChannelMonitor<'a> {
- pub added_monitors: Mutex<Vec<(OutPoint, channelmonitor::ChannelMonitor<EnforcingChannelKeys>)>>,
+pub struct OnlyReadsKeysInterface {}
+impl keysinterface::KeysInterface for OnlyReadsKeysInterface {
+ type Signer = EnforcingSigner;
+
+ fn get_node_secret(&self) -> SecretKey { unreachable!(); }
+ fn get_destination_script(&self) -> Script { unreachable!(); }
+ fn get_shutdown_pubkey(&self) -> PublicKey { unreachable!(); }
+ fn get_channel_signer(&self, _inbound: bool, _channel_value_satoshis: u64) -> EnforcingSigner { unreachable!(); }
+ fn get_secure_random_bytes(&self) -> [u8; 32] { [0; 32] }
+
+ fn read_chan_signer(&self, reader: &[u8]) -> Result<Self::Signer, msgs::DecodeError> {
+ EnforcingSigner::read(&mut std::io::Cursor::new(reader))
+ }
+}
+
+pub struct TestChainMonitor<'a> {
+ pub added_monitors: Mutex<Vec<(OutPoint, channelmonitor::ChannelMonitor<EnforcingSigner>)>>,