Skip to content

Commit

Permalink
Add BenchmarkStateDiffHash()
Browse files Browse the repository at this point in the history
  • Loading branch information
IronGauntlets committed Dec 24, 2024
1 parent c5a362f commit dfeb41a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/state_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ func TestStateDiffHash(t *testing.T) {
}
}

func BenchmarkStateDiffHash(b *testing.B) {
client := feeder.NewTestClient(b, &utils.SepoliaIntegration)
gw := adaptfeeder.New(client)
su, err := gw.StateUpdate(context.Background(), 38748)
require.NoError(b, err)

b.ResetTimer()
for n := 0; n < b.N; n++ {
su.StateDiff.Hash()
}
}

func TestStateDiffLength(t *testing.T) {
client := feeder.NewTestClient(t, &utils.Sepolia)
gw := adaptfeeder.New(client)
Expand Down

0 comments on commit dfeb41a

Please sign in to comment.