From 5aebb69b8752b2ce1a6c7fdc08f391ecc4ecafdd Mon Sep 17 00:00:00 2001 From: Christopher Tarry Date: Tue, 3 Dec 2024 20:48:30 -0500 Subject: [PATCH] fix satisfied policy check --- internal/testutil/check.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/testutil/check.go b/internal/testutil/check.go index cf21c94..4daa362 100644 --- a/internal/testutil/check.go +++ b/internal/testutil/check.go @@ -143,7 +143,10 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl Equal(t, "maturity height", expected.Parent.MaturityHeight, got.Parent.MaturityHeight) Equal(t, "id", expected.Parent.ID, got.Parent.ID) Equal(t, "leaf index", expected.Parent.StateElement.LeafIndex, got.Parent.StateElement.LeafIndex) - // Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy) + if len(got.SatisfiedPolicy.Preimages) == 0 { + got.SatisfiedPolicy.Preimages = nil + } + Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy) } Equal(t, "siacoin outputs", len(expectTxn.SiacoinOutputs), len(gotTxn.SiacoinOutputs)) @@ -165,7 +168,10 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl Equal(t, "claim address", expected.ClaimAddress, got.ClaimAddress) Equal(t, "id", expected.Parent.ID, got.Parent.ID) Equal(t, "leaf index", expected.Parent.StateElement.LeafIndex, got.Parent.StateElement.LeafIndex) - // Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy) + if len(got.SatisfiedPolicy.Preimages) == 0 { + got.SatisfiedPolicy.Preimages = nil + } + Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy) } Equal(t, "siafund outputs", len(expectTxn.SiafundOutputs), len(gotTxn.SiafundOutputs))