File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -421,15 +421,15 @@ impl PeerChannelEncryptor {
421
421
* rn += 1 ;
422
422
Ok ( byte_utils:: slice_to_be16 ( & res) )
423
423
} ,
424
- _ => panic ! ( "Tried to encrypt a message prior to noise handshake completion" ) ,
424
+ _ => panic ! ( "Tried to decrypt a message prior to noise handshake completion" ) ,
425
425
}
426
426
}
427
427
428
428
/// Decrypts the given message.
429
429
/// panics if msg.len() > 65535 + 16
430
430
pub fn decrypt_message ( & mut self , msg : & [ u8 ] ) -> Result < Vec < u8 > , LightningError > {
431
431
if msg. len ( ) > LN_MAX_MSG_LEN + 16 {
432
- panic ! ( "Attempted to encrypt message longer than 65535 bytes!" ) ;
432
+ panic ! ( "Attempted to decrypt message longer than 65535 + 16 bytes!" ) ;
433
433
}
434
434
435
435
match self . noise_state {
@@ -441,7 +441,7 @@ impl PeerChannelEncryptor {
441
441
442
442
Ok ( res)
443
443
} ,
444
- _ => panic ! ( "Tried to encrypt a message prior to noise handshake completion" ) ,
444
+ _ => panic ! ( "Tried to decrypt a message prior to noise handshake completion" ) ,
445
445
}
446
446
}
447
447
You can’t perform that action at this time.
0 commit comments