From 311555a191a9fcca304044fb59c6061e6992ef68 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 2 Feb 2021 22:45:53 -0500 Subject: [PATCH] [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. --- lightning/src/ln/functional_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index 53e7649d1..11a202d54 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -4744,7 +4744,7 @@ macro_rules! check_spendable_outputs { input: vec![input], output: vec![outp.clone()], }; - spend_tx.output[0].value -= (spend_tx.get_weight() + 2 + 1 + 73 + 35 + 3) as u64 / 4; // (Max weight + 3 (to round up)) / 4 + spend_tx.output[0].value -= (spend_tx.get_weight() + 2 + 1 + 73 + 34 + 3) as u64 / 4; // (Max weight + 3 (to round up)) / 4 let secret = { match ExtendedPrivKey::new_master(Network::Testnet, &$node.node_seed) { Ok(master_key) => { -- 2.39.5