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: Martin Holst Swende <martin@swende.se>
This commit is contained in:
parent
a04c981d70
commit
881ce78c89
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ func (e Error) String() string {
|
||||||
|
|
||||||
func (e *Error) Unpack(data []byte) (interface{}, error) {
|
func (e *Error) Unpack(data []byte) (interface{}, error) {
|
||||||
if len(data) < 4 {
|
if len(data) < 4 {
|
||||||
return "", fmt.Errorf("invalid data length for unpacking: got %v, want 4", len(data))
|
return "", fmt.Errorf("insufficient data for unpacking: have %d, want at least 4", len(data))
|
||||||
}
|
}
|
||||||
if !bytes.Equal(data[:4], e.ID[:4]) {
|
if !bytes.Equal(data[:4], e.ID[:4]) {
|
||||||
return "", fmt.Errorf("invalid event ID, got %v want %v", data[:4], e.ID[:4])
|
return "", fmt.Errorf("invalid event ID, got %v want %v", data[:4], e.ID[:4])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue