Change consensus::encode::serialize assert to debug_assert

This is just a sanity check on our own serialization code.
This commit is contained in:
Steven Roose 2020-10-23 17:28:49 +01:00
parent ab9514983b
commit 545965d9e3
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ impl From<psbt::Error> for Error {
pub fn serialize<T: Encodable + ?Sized>(data: &T) -> Vec<u8> {
let mut encoder = Vec::new();
let len = data.consensus_encode(&mut encoder).unwrap();
assert_eq!(len, encoder.len());
debug_assert_eq!(len, encoder.len());
encoder
}