mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +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 (
|
var (
|
||||||
value common.Hash
|
value common.Hash
|
||||||
ok bool
|
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
|
// Try to resolve the requested storage slot in the local cache
|
||||||
bucket.lock.RLock()
|
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
|
// Preload the touched accounts and storage slots in advance
|
||||||
sender, err := types.Sender(signer, tx)
|
sender, err := types.Sender(signer, tx)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
reader.Account(sender)
|
fails.Add(1)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
reader.Account(sender)
|
||||||
|
|
||||||
if tx.To() != nil {
|
if tx.To() != nil {
|
||||||
account, _ := reader.Account(*tx.To())
|
account, _ := reader.Account(*tx.To())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue