You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let logger = WithContext::from(&self.logger, Some(*counterparty_node_id), None, None);
7212
+
let our_peer_storage = self.our_peer_storage.read().unwrap();
7213
+
if msg.data.len() < 16 {
7214
+
log_debug!(logger, "Invalid YourPeerStorage received from {}", log_pubkey!(counterparty_node_id));
7215
+
return;
7216
+
}
7217
+
7218
+
let mut res = vec![0; msg.data.len() - 16];
7219
+
7220
+
match our_peer_storage.decrypt_our_peer_storage(&mut res, msg.data.as_slice(), self.our_peerstorage_encryption_key) {
7221
+
Ok(()) => {
7222
+
// Decryption successful, the plaintext is now stored in `res`
7223
+
log_debug!(logger, "Decryption successful");
7224
+
let our_peer_storage = <OurPeerStorage as Readable>::read(&mut ::std::io::Cursor::new(res)).unwrap();
7225
+
7226
+
for ps_channel in &our_peer_storage.channels {
7227
+
let keys: <<SP as Deref>::Target as SignerProvider>::EcdsaSigner = self.signer_provider.derive_channel_signer(ps_channel.channel_value_stoshis, ps_channel.channel_keys_id);
7228
+
let pubkeys: crate::ln::chan_utils::ChannelPublicKeys = keys.pubkeys().clone();
7229
+
let funding_redeemscript = make_funding_redeemscript(&pubkeys.funding_pubkey, counterparty_node_id);
7230
+
let funding_txo_script = funding_redeemscript.to_v0_p2wsh();
0 commit comments