diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-01-14 19:17:59 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-01-14 19:17:59 +0800 |
commit | 5945a33350ea6e8bfc6308826efe16aab0e2e93d (patch) | |
tree | 35588f198a3f0b9d9216421a34ed6a862d3efe3f /core | |
parent | 1b8566a7b137d68c5c7c42d6300378d7ebf21c49 (diff) | |
parent | 2d5d6d9d0e4dbcd03d563bdc67fa31514bdafdac (diff) | |
download | go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar.gz go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar.bz2 go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar.lz go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar.xz go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.tar.zst go-tangerine-5945a33350ea6e8bfc6308826efe16aab0e2e93d.zip |
Merge pull request #2119 from karalabe/statedb-batch-commit
core/state: always commit in batches, just finish if not needed later
Diffstat (limited to 'core')
-rw-r--r-- | core/state/statedb.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index 413321057..8093472b5 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -353,7 +353,8 @@ func (s *StateDB) IntermediateRoot() common.Hash { // Commit commits all state changes to the database. func (s *StateDB) Commit() (root common.Hash, err error) { - return s.commit(s.db) + root, batch := s.CommitBatch() + return root, batch.Write() } // CommitBatch commits all state changes to a write batch but does not |