diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-03-14 21:25:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 21:25:12 +0800 |
commit | 91eec1251c06727581063cd7e942ba913d806971 (patch) | |
tree | e47da6be2a8b15116b773855cf06473d5b4b64ed /eth | |
parent | e270a753bec7e723e7909b55543a54e26210dd8a (diff) | |
download | go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.gz go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.bz2 go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.lz go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.xz go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.zst go-tangerine-91eec1251c06727581063cd7e942ba913d806971.zip |
cmd, core, eth, trie: get rid of trie cache generations (#19262)
* cmd, core, eth, trie: get rid of trie cache generations
* core, trie: get rid of remainder of cache gen boilerplate
Diffstat (limited to 'eth')
-rw-r--r-- | eth/api.go | 4 | ||||
-rw-r--r-- | eth/downloader/downloader_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/eth/api.go b/eth/api.go index 816b9cd33..03ac74247 100644 --- a/eth/api.go +++ b/eth/api.go @@ -446,11 +446,11 @@ func (api *PrivateDebugAPI) getModifiedAccounts(startBlock, endBlock *types.Bloc } triedb := api.eth.BlockChain().StateCache().TrieDB() - oldTrie, err := trie.NewSecure(startBlock.Root(), triedb, 0) + oldTrie, err := trie.NewSecure(startBlock.Root(), triedb) if err != nil { return nil, err } - newTrie, err := trie.NewSecure(endBlock.Root(), triedb, 0) + newTrie, err := trie.NewSecure(endBlock.Root(), triedb) if err != nil { return nil, err } diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index 405d52a71..bee6438bf 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -187,7 +187,7 @@ func (dl *downloadTester) CurrentFastBlock() *types.Block { func (dl *downloadTester) FastSyncCommitHead(hash common.Hash) error { // For now only check that the state trie is correct if block := dl.GetBlockByHash(hash); block != nil { - _, err := trie.NewSecure(block.Root(), trie.NewDatabase(dl.stateDb), 0) + _, err := trie.NewSecure(block.Root(), trie.NewDatabase(dl.stateDb)) return err } return fmt.Errorf("non existent block: %x", hash[:4]) |