Skip to content

Commit aef598f

Browse files
committed
[tests] Correct witness len calc in StaticOutputCounterpartyPayment
We previously counted 35 bytes for a length + public key, but in reality they are never larger than 34 bytes - 33 for the key and 1 for the push length.
1 parent aa5768b commit aef598f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4744,7 +4744,7 @@ macro_rules! check_spendable_outputs {
47444744
input: vec![input],
47454745
output: vec![outp.clone()],
47464746
};
4747-
spend_tx.output[0].value -= (spend_tx.get_weight() + 2 + 1 + 73 + 35 + 3) as u64 / 4; // (Max weight + 3 (to round up)) / 4
4747+
spend_tx.output[0].value -= (spend_tx.get_weight() + 2 + 1 + 73 + 34 + 3) as u64 / 4; // (Max weight + 3 (to round up)) / 4
47484748
let secret = {
47494749
match ExtendedPrivKey::new_master(Network::Testnet, &$node.node_seed) {
47504750
Ok(master_key) => {

0 commit comments

Comments
 (0)