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.
This commit is contained in:
Conner Fromknecht 2020-03-04 08:00:09 -08:00
parent 42e65d4ae5
commit be74d94c48
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -97,11 +97,11 @@ func TestTxWeightEstimator(t *testing.T) {
numP2SHOutputs: 1,
},
{
numNestedP2WKHInputs: 1,
numNestedP2WKHInputs: 253,
numP2WKHOutputs: 1,
},
{
numNestedP2WSHInputs: 1,
numNestedP2WSHInputs: 253,
numP2WKHOutputs: 1,
},
}