aboutsummaryrefslogtreecommitdiffstats
path: root/light/postprocess.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-11-15 20:42:19 +0800
committerGitHub <noreply@github.com>2018-11-15 20:42:19 +0800
commit17d67c5834679f2b27ef08eddfce3b3a154a96a8 (patch)
tree3989575655db27f02641bf1fc7d96f87a9441ebb /light/postprocess.go
parent14346e4ef97ca812fb9f1d5d2cd87021c0155cf6 (diff)
parent434dd5bc0067cdf604d84426df9086015721dd36 (diff)
downloadgo-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.gz
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.bz2
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.lz
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.xz
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.tar.zst
go-tangerine-17d67c5834679f2b27ef08eddfce3b3a154a96a8.zip
Merge pull request #18087 from karalabe/trie-read-cacher
cmd, core, eth, light, trie: add trie read caching layer
Diffstat (limited to 'light/postprocess.go')
-rw-r--r--light/postprocess.go4
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,
}