Skip to content

Commit

Permalink
Signature weight should be estimated at 73 based on BOLT-3
Browse files Browse the repository at this point in the history
  • Loading branch information
devrandom committed Oct 19, 2022
1 parent 95bb27a commit 72c819c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ impl<Signer: Sign> Channel<Signer> {
1 + // witness element count
4 + // 4 element lengths (2 sigs, multisig dummy, and witness script)
self.get_funding_redeemscript().len() as u64 + // funding witness script
2*(1 + 71); // two signatures + sighash type flags
2*(1 + 71 + 1); // two signatures + sighash type flags + sig lengths
if let Some(spk) = a_scriptpubkey {
ret += ((8+1) + // output values and script length
spk.len() as u64) * 4; // scriptpubkey and witness multiplier
Expand Down

0 comments on commit 72c819c

Please sign in to comment.