diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-11-13 00:47:34 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-11-15 18:22:13 +0800 |
commit | 434dd5bc0067cdf604d84426df9086015721dd36 (patch) | |
tree | 279d85e32a36b8804d60c5a4b83b444514850782 /light | |
parent | 9a000601c6c4e4f8134caedba1957ffe28d2b659 (diff) | |
download | dexon-434dd5bc0067cdf604d84426df9086015721dd36.tar.gz dexon-434dd5bc0067cdf604d84426df9086015721dd36.tar.zst dexon-434dd5bc0067cdf604d84426df9086015721dd36.zip |
cmd, core, eth, light, trie: add trie read caching layer
Diffstat (limited to 'light')
-rw-r--r-- | light/postprocess.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/light/postprocess.go b/light/postprocess.go index 1cfd7535e..dd1b74a7b 100644 --- a/light/postprocess.go +++ b/light/postprocess.go @@ -159,7 +159,7 @@ func NewChtIndexer(db ethdb.Database, odr OdrBackend, size, confirms uint64) *co diskdb: db, odr: odr, trieTable: trieTable, - triedb: trie.NewDatabase(trieTable), + triedb: trie.NewDatabaseWithCache(trieTable, 1), // Use a tiny cache only to keep memory down sectionSize: size, } return core.NewChainIndexer(db, ethdb.NewTable(db, "chtIndex-"), backend, size, confirms, time.Millisecond*100, "cht") @@ -281,7 +281,7 @@ func NewBloomTrieIndexer(db ethdb.Database, odr OdrBackend, parentSize, size uin diskdb: db, odr: odr, trieTable: trieTable, - triedb: trie.NewDatabase(trieTable), + triedb: trie.NewDatabaseWithCache(trieTable, 1), // Use a tiny cache only to keep memory down parentSize: parentSize, size: size, } |