diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-09-26 16:20:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-26 16:20:47 +0800 |
commit | 2e14aff80f294a34f6b28f0149b94fa7b9d3bf81 (patch) | |
tree | 17d1f3abefabfd7f8cb9149994a4788d2c0f08bc /accounts/abi | |
parent | e859f3696783ec75d9bb39c0c66eda3a88cea8c6 (diff) | |
parent | a59a93f476434f2805c8fd3e10bf1b2f579b078f (diff) | |
download | dexon-2e14aff80f294a34f6b28f0149b94fa7b9d3bf81.tar.gz dexon-2e14aff80f294a34f6b28f0149b94fa7b9d3bf81.tar.zst dexon-2e14aff80f294a34f6b28f0149b94fa7b9d3bf81.zip |
Merge pull request #3037 from karalabe/state-caching
State caching
Diffstat (limited to 'accounts/abi')
-rw-r--r-- | accounts/abi/bind/backends/simulated.go | 7 |
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. |