mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
onchaind: Adjust witness weight estimate to be more conservative
We were missing the OP_PUSH for the pubkeys, and the spec mentions we should be using 73 bytes to estimate the witness weight. Effectively this adds 4 bytes which really just matters in case fees hit the floor, and computing the weight becomes important. Changelog-Fixed: onchaind: Witness weight estimations could be slightly lower than the VLS signer
This commit is contained in:
@@ -427,7 +427,7 @@ def basic_fee(feerate):
|
||||
|
||||
def closing_fee(feerate, num_outputs):
|
||||
assert num_outputs == 1 or num_outputs == 2
|
||||
weight = 424 + 124 * num_outputs
|
||||
weight = 428 + 124 * num_outputs
|
||||
return (weight * feerate) // 1000
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user