mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update accounts/abi/error.go
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
f549c17e32
commit
1f8b31c8d0
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ func (e *Error) Unpack(data []byte) (interface{}, error) {
|
||||||
return "", fmt.Errorf("invalid data length for unpacking: got %v, want 4", len(data))
|
return "", fmt.Errorf("invalid data length for unpacking: got %v, want 4", len(data))
|
||||||
}
|
}
|
||||||
if !bytes.Equal(data[:4], e.ID[:4]) {
|
if !bytes.Equal(data[:4], e.ID[:4]) {
|
||||||
return "", errors.New("invalid data for unpacking, first four bytes are not equal with error's signature")
|
return "", fmt.Errorf("invalid event ID, got %v want %v", data[:4], e.ID[:4])
|
||||||
}
|
}
|
||||||
return e.Inputs.Unpack(data[4:])
|
return e.Inputs.Unpack(data[4:])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue