From: Matt Corallo Date: Sun, 14 Apr 2019 20:14:04 +0000 (-0400) Subject: Fix weight calc that ignored the witness flag and dummy bytes X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=7dc754c3092a57636640f6ed04e09df59199dbba;p=rust-lightning Fix weight calc that ignored the witness flag and dummy bytes --- diff --git a/src/ln/channelmonitor.rs b/src/ln/channelmonitor.rs index 1888117e8..0bc03ae6d 100644 --- a/src/ln/channelmonitor.rs +++ b/src/ln/channelmonitor.rs @@ -487,7 +487,7 @@ impl ChannelMonitor { } fn get_witnesses_weight(inputs: &Vec) -> u64 { - let mut tx_weight = 0; + let mut tx_weight = 2; for inp in inputs { // We use expected weight (and not actual) as signatures and time lock delays may vary tx_weight += match inp {