diff --git a/core/state/reader.go b/core/state/reader.go index fafddd2d32..5ad0385e9e 100644 --- a/core/state/reader.go +++ b/core/state/reader.go @@ -472,7 +472,7 @@ func (r *readerWithCache) Storage(addr common.Address, slot common.Hash) (common var ( value common.Hash ok bool - bucket = &r.storageBuckets[addr[0]&0x04] + bucket = &r.storageBuckets[addr[0]&0x0f] ) // Try to resolve the requested storage slot in the local cache bucket.lock.RLock() diff --git a/core/state_prefetcher.go b/core/state_prefetcher.go index c6ce423e51..f3129f57cd 100644 --- a/core/state_prefetcher.go +++ b/core/state_prefetcher.go @@ -69,9 +69,12 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c } // Preload the touched accounts and storage slots in advance sender, err := types.Sender(signer, tx) - if err == nil { - reader.Account(sender) + if err != nil { + fails.Add(1) + return nil } + reader.Account(sender) + if tx.To() != nil { account, _ := reader.Account(*tx.To())