aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-23 03:04:58 +0800
committerFelix Lange <fjl@twurst.com>2016-09-26 16:09:52 +0800
commita59a93f476434f2805c8fd3e10bf1b2f579b078f (patch)
tree17d1f3abefabfd7f8cb9149994a4788d2c0f08bc /accounts
parente859f3696783ec75d9bb39c0c66eda3a88cea8c6 (diff)
downloadgo-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar.gz
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar.bz2
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar.lz
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar.xz
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.tar.zst
go-tangerine-a59a93f476434f2805c8fd3e10bf1b2f579b078f.zip
core/state: track all accounts in canon state
This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
Diffstat (limited to 'accounts')
-rw-r--r--accounts/abi/bind/backends/simulated.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go
index 29b4e8ea3..7e09abb11 100644
--- a/accounts/abi/bind/backends/simulated.go
+++ b/accounts/abi/bind/backends/simulated.go
@@ -135,11 +135,8 @@ func (b *SimulatedBackend) StorageAt(ctx context.Context, contract common.Addres
return nil, errBlockNumberUnsupported
}
statedb, _ := b.blockchain.State()
- if obj := statedb.GetStateObject(contract); obj != nil {
- val := obj.GetState(key)
- return val[:], nil
- }
- return nil, nil
+ val := statedb.GetState(contract, key)
+ return val[:], nil
}
// TransactionReceipt returns the receipt of a transaction.