From: Matt Corallo Date: Fri, 3 Aug 2018 02:21:06 +0000 (-0400) Subject: Fix UpdateAddHTLC serialize vec capacity default X-Git-Tag: v0.0.12~354^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=refs%2Fheads%2F2018-08-fuzz-fixes;p=rust-lightning Fix UpdateAddHTLC serialize vec capacity default --- 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));