From 98a69a8a9d273c1d2751722ef3c7157e32b8cbae Mon Sep 17 00:00:00 2001 From: Ikeh Celestine Chukwudi Date: Sat, 7 Nov 2026 11:05:05 +0100 Subject: [PATCH] chore: remove unused txout_weight_from_spk_len txout_weight_from_spk_len multiplied TXOUT_BASE_WEIGHT, which is already in weight units, by 4 again and counted the scriptPubKey length prefix twice, so it overcounted every output by 112 WU (284 WU for P2TR instead of 172). Nothing in the crate calls it, so remove it. Fixes #91. --- src/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d59ac14..aca57de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,8 +77,3 @@ const fn varint_size(v: usize) -> u64 { } 9 } - -#[allow(unused)] -fn txout_weight_from_spk_len(spk_len: usize) -> u64 { - (TXOUT_BASE_WEIGHT + varint_size(spk_len) + (spk_len as u64)) * 4 -}