From be74d94c48498459814cd690be58efb06f5bd285 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 4 Mar 2020 08:00:09 -0800 Subject: [PATCH] lnwallet/size_test: add test exercising nested input count bug This commit modifies the NP2WKH and NP2WSH input tests to ensure the input count is properly incremented and accounted for in the size estimate. 253 is chosen because it is the lowest value that, when serialized, occupies more than one byte on the wire. --- lnwallet/size_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnwallet/size_test.go b/lnwallet/size_test.go index 36dac258..cf8cbb68 100644 --- a/lnwallet/size_test.go +++ b/lnwallet/size_test.go @@ -97,11 +97,11 @@ func TestTxWeightEstimator(t *testing.T) { numP2SHOutputs: 1, }, { - numNestedP2WKHInputs: 1, + numNestedP2WKHInputs: 253, numP2WKHOutputs: 1, }, { - numNestedP2WSHInputs: 1, + numNestedP2WSHInputs: 253, numP2WKHOutputs: 1, }, }