diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-09-28 18:40:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 18:40:44 +0800 |
commit | f88bca7ba96a16e10b9feee453dbdb4f81962f34 (patch) | |
tree | 15f58419e13f75dc0dfa940be0b1a9f3930de34f /core/blockchain.go | |
parent | 7a5843de318f4bf0e41ddaab2d690fbe6fd04099 (diff) | |
parent | d4608ae0d2fc76ea1ba1d3a97033e60bab1f0d59 (diff) | |
download | go-tangerine-1.4.14.tar go-tangerine-1.4.14.tar.gz go-tangerine-1.4.14.tar.bz2 go-tangerine-1.4.14.tar.lz go-tangerine-1.4.14.tar.xz go-tangerine-1.4.14.tar.zst go-tangerine-1.4.14.zip |
Merge pull request #3055 from karalabe/release/1.4v1.4.14
Geth 1.4.14: What else should we rewrite?
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 5fc6b2190..9a8a72d0b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -357,7 +357,12 @@ func (self *BlockChain) AuxValidator() pow.PoW { return self.pow } // State returns a new mutable state based on the current HEAD block. func (self *BlockChain) State() (*state.StateDB, error) { - return state.New(self.CurrentBlock().Root(), self.chainDb) + return self.StateAt(self.CurrentBlock().Root()) +} + +// StateAt returns a new mutable state based on a particular point in time. +func (self *BlockChain) StateAt(root common.Hash) (*state.StateDB, error) { + return self.stateCache.New(root) } // Reset purges the entire blockchain, restoring it to its genesis state. |