multi: apply the new type lntypes.WeightUnit

This commit is contained in:
yyforyongyu
2024-05-24 21:56:30 +08:00
parent dc9a0b31c0
commit 8da68bb7db
36 changed files with 178 additions and 133 deletions

View File

@@ -297,11 +297,12 @@ func TestTxWeightEstimator(t *testing.T) {
tx.AddTxOut(&wire.TxOut{PkScript: p2shScript})
}
expectedWeight := blockchain.GetTransactionWeight(btcutil.NewTx(tx))
if weightEstimate.Weight() != int(expectedWeight) {
t.Errorf("Case %d: Got wrong weight: expected %d, got %d",
i, expectedWeight, weightEstimate.Weight())
}
expectedWeight := blockchain.GetTransactionWeight(
btcutil.NewTx(tx),
)
require.EqualValuesf(t, expectedWeight, weightEstimate.Weight(),
"Case %d: Got wrong weight: expected %d, got %d",
i, expectedWeight, weightEstimate.Weight())
}
}