projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix weight calc that ignored the witness flag and dummy bytes
[rust-lightning]
/
src
/
ln
/
channelmonitor.rs
diff --git
a/src/ln/channelmonitor.rs
b/src/ln/channelmonitor.rs
index 1888117e849585fb20e7cf307b51171de0a3e246..0bc03ae6d0d008ae307052a3a84d261c71e5928d 100644
(file)
--- a/
src/ln/channelmonitor.rs
+++ b/
src/ln/channelmonitor.rs
@@
-487,7
+487,7
@@
impl ChannelMonitor {
}
fn get_witnesses_weight(inputs: &Vec<InputDescriptors>) -> 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 {