mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
core: address comments from marius
This commit is contained in:
parent
21be8b4740
commit
8be2f847a9
2 changed files with 6 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue