From c52825d5f1854f4ae71e5e2ec15d684c2672c4c4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 2 Aug 2018 22:21:06 -0400 Subject: [PATCH] Fix UpdateAddHTLC serialize vec capacity default --- src/ln/msgs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ln/msgs.rs b/src/ln/msgs.rs index f0f28c6b7..14c16e94b 100644 --- a/src/ln/msgs.rs +++ b/src/ln/msgs.rs @@ -937,7 +937,7 @@ impl MsgDecodable for UpdateAddHTLC { } impl MsgEncodable for UpdateAddHTLC { fn encode(&self) -> Vec { - let mut res = Vec::with_capacity(32+8+8+32+4+1+1366); + let mut res = Vec::with_capacity(32+8+8+32+4+1366); res.extend_from_slice(&self.channel_id); res.extend_from_slice(&byte_utils::be64_to_array(self.htlc_id)); res.extend_from_slice(&byte_utils::be64_to_array(self.amount_msat)); -- 2.39.5