Change consensus::encode::serialize assert to debug_assert
This is just a sanity check on our own serialization code.
This commit is contained in:
parent
ab9514983b
commit
545965d9e3
|
@ -147,7 +147,7 @@ impl From<psbt::Error> for Error {
|
||||||
pub fn serialize<T: Encodable + ?Sized>(data: &T) -> Vec<u8> {
|
pub fn serialize<T: Encodable + ?Sized>(data: &T) -> Vec<u8> {
|
||||||
let mut encoder = Vec::new();
|
let mut encoder = Vec::new();
|
||||||
let len = data.consensus_encode(&mut encoder).unwrap();
|
let len = data.consensus_encode(&mut encoder).unwrap();
|
||||||
assert_eq!(len, encoder.len());
|
debug_assert_eq!(len, encoder.len());
|
||||||
encoder
|
encoder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue