Skip to content

Commit

Permalink
Update compare_test.go
Browse files Browse the repository at this point in the history
Signed-off-by: GarmashAlex <garmasholeksii@gmail.com>
  • Loading branch information
GarmashAlex authored Jan 4, 2025
1 parent 1e1a869 commit 0792f78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testing/quick/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ var hFn = ztree.GetHashFn()
var spec = zspec.Mainnet

func TestExecutionPayloadHashTreeRootZrnt(t *testing.T) {
t.Parallel()

f := func(payload *types.ExecutionPayload, logsBloom [256]byte) bool {
// skip these cases lest we trigger a
// nil-pointer dereference in fastssz
Expand All @@ -54,6 +56,12 @@ func TestExecutionPayloadHashTreeRootZrnt(t *testing.T) {
return true
}

defer func() {
if r := recover(); r != nil {
t.Errorf("Test panicked: %v", r)
}
}()

payload.LogsBloom = logsBloom
payload.BaseFeePerGas = math.NewU256(123)
typeRoot := payload.HashTreeRoot()
Expand Down

0 comments on commit 0792f78

Please sign in to comment.