Skip to content

Commit

Permalink
Merge pull request #309 from OffchainLabs/casting-bytes
Browse files Browse the repository at this point in the history
Cast bytes to fixed size array instead of copying [part of NIT-1346]
  • Loading branch information
anodar authored Apr 23, 2024
2 parents cb4fc77 + 2661a10 commit 56f17c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,8 +1068,7 @@ func TestABI_ErrorByID(t *testing.T) {
}
for name, m := range abi.Errors {
a := fmt.Sprintf("%v", &m)
var id [4]byte
copy(id[:], m.ID[:4])
id := [4]byte(m.ID.Bytes())
m2, err := abi.ErrorByID(id)
if err != nil {
t.Fatalf("Failed to look up ABI error: %v", err)
Expand Down

0 comments on commit 56f17c8

Please sign in to comment.