Skip to content

Commit

Permalink
Remove remaining use of Hex2Bytes (ethereum-optimism#10569)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianst authored May 17, 2024
1 parent 5f42778 commit 691c58a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions op-challenger/game/fault/contracts/faultdisputegame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func TestSimpleGetters(t *testing.T) {

func TestClock_EncodingDecoding(t *testing.T) {
t.Run("DurationAndTimestamp", func(t *testing.T) {
by := common.Hex2Bytes("00000000000000050000000000000002")
by := common.FromHex("00000000000000050000000000000002")
encoded := new(big.Int).SetBytes(by)
clock := decodeClock(encoded)
require.Equal(t, 5*time.Second, clock.Duration)
Expand All @@ -194,7 +194,7 @@ func TestClock_EncodingDecoding(t *testing.T) {
})

t.Run("ZeroDuration", func(t *testing.T) {
by := common.Hex2Bytes("00000000000000000000000000000002")
by := common.FromHex("00000000000000000000000000000002")
encoded := new(big.Int).SetBytes(by)
clock := decodeClock(encoded)
require.Equal(t, 0*time.Second, clock.Duration)
Expand All @@ -203,7 +203,7 @@ func TestClock_EncodingDecoding(t *testing.T) {
})

t.Run("ZeroTimestamp", func(t *testing.T) {
by := common.Hex2Bytes("00000000000000050000000000000000")
by := common.FromHex("00000000000000050000000000000000")
encoded := new(big.Int).SetBytes(by)
clock := decodeClock(encoded)
require.Equal(t, 5*time.Second, clock.Duration)
Expand All @@ -212,7 +212,7 @@ func TestClock_EncodingDecoding(t *testing.T) {
})

t.Run("ZeroClock", func(t *testing.T) {
by := common.Hex2Bytes("00000000000000000000000000000000")
by := common.FromHex("00000000000000000000000000000000")
encoded := new(big.Int).SetBytes(by)
clock := decodeClock(encoded)
require.Equal(t, 0*time.Second, clock.Duration)
Expand Down

0 comments on commit 691c58a

Please sign in to comment.