diff --git a/core/blockchain_reader.go b/core/blockchain_reader.go index c2374f14b7..c34ede8286 100644 --- a/core/blockchain_reader.go +++ b/core/blockchain_reader.go @@ -374,7 +374,7 @@ func (bc *BlockChain) StateAt(root common.Hash) (*state.StateDB, error) { // Instead of that, it will be more useful to return an error to indicate // the state is not available. if stateDb.NoTrie() && stateDb.GetSnap() == nil { - return nil, errors.New("state is not available") + return stateDb, errors.New("state is not available") } return stateDb, err