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
Ensure ChannelManager properly handles peer_storage_retrieval.
- Write internal_peer_storage_retreival to verify if we recv correct peer storage.
- Send error if we get invalid peer_storage data.
// TODO: Check if have any stale or missing ChannelMonitor.
8348
8349
let logger = WithContext::from(&self.logger, Some(counterparty_node_id), None, None);
8349
8350
8350
-
log_debug!(logger, "Received unexpected peer_storage_retrieval from {}. This is unusual since we do not yet distribute peer storage. Sending a warning.", log_pubkey!(counterparty_node_id));
8351
+
// `MIN_CYPHERTEXT_LEN` is 16 bytes because the mandatory authentication tag length is 16 bytes.
8352
+
const MIN_CYPHERTEXT_LEN: usize = 16;
8353
+
8354
+
if msg.data.len() < MIN_CYPHERTEXT_LEN {
8355
+
log_debug!(logger, "Invalid YourPeerStorage received from {}", log_pubkey!(counterparty_node_id));
0 commit comments