Skip to content

Commit

Permalink
fix satisfied policy check
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 committed Dec 4, 2024
1 parent eaa442b commit c20cbb0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/testutil/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit c20cbb0

Please sign in to comment.