From 7dc754c3092a57636640f6ed04e09df59199dbba Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 14 Apr 2019 16:14:04 -0400 Subject: [PATCH] Fix weight calc that ignored the witness flag and dummy bytes --- src/ln/channelmonitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.39.5