We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9c8ef6 commit 2c315a3Copy full SHA for 2c315a3
lightning/src/ln/peer_channel_encryptor.rs
@@ -427,6 +427,12 @@ impl PeerChannelEncryptor {
427
Ok(self.their_node_id.unwrap().clone())
428
}
429
430
+ /// Builds sendable bytes for a message.
431
+ ///
432
+ /// `msgbuf` must begin with 16 + 2 dummy/0 bytes, which will be filled with the encrypted
433
+ /// message length and its MAC. It should then be followed by the message bytes themselves
434
+ /// (including the two byte message type), and have an extra 16 bytes of capacity remaining for
435
+ /// the message MAC, which will be appended to the vec.
436
fn encrypt_message_with_header_0s(&mut self, msgbuf: &mut Vec<u8>) {
437
let msg_len = msgbuf.len() - 16 - 2;
438
if msg_len > LN_MAX_MSG_LEN {
0 commit comments