From a59a93f476434f2805c8fd3e10bf1b2f579b078f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 22 Sep 2016 21:04:58 +0200 Subject: 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. --- accounts/abi/bind/backends/simulated.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'accounts/abi') 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. -- cgit