diff --git a/eth/api.go b/eth/api.go index 76118e2d7f..fd35656476 100644 --- a/eth/api.go +++ b/eth/api.go @@ -389,6 +389,8 @@ func (api *PublicDebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, sta if err != nil { return state.IteratorDump{}, err } + } else { + return state.IteratorDump{}, errors.New("either block number or block hash must be specified") } if maxResults > AccountRangeMaxResults || maxResults <= 0 {