aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-06 00:40:32 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-02-06 00:40:32 +0800
commit55599ee95d4151a2502465e0afc7c47bd1acba77 (patch)
tree4165e73ae852db4f025a5ed57f0bc499e87cb8b9 /eth/backend.go
parent59336283c0dbeb1d0a74ff7a8b717b2b3bb0cf40 (diff)
downloaddexon-55599ee95d4151a2502465e0afc7c47bd1acba77.tar.gz
dexon-55599ee95d4151a2502465e0afc7c47bd1acba77.tar.zst
dexon-55599ee95d4151a2502465e0afc7c47bd1acba77.zip
core, trie: intermediate mempool between trie and database (#15857)
This commit reduces database I/O by not writing every state trie to disk.
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/eth/backend.go b/eth/backend.go
index bcd724c0c..94aad2310 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -144,9 +144,11 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
}
core.WriteBlockChainVersion(chainDb, core.BlockChainVersion)
}
-
- vmConfig := vm.Config{EnablePreimageRecording: config.EnablePreimageRecording}
- eth.blockchain, err = core.NewBlockChain(chainDb, eth.chainConfig, eth.engine, vmConfig)
+ var (
+ vmConfig = vm.Config{EnablePreimageRecording: config.EnablePreimageRecording}
+ cacheConfig = &core.CacheConfig{Disabled: config.NoPruning, TrieNodeLimit: config.TrieCache, TrieTimeLimit: config.TrieTimeout}
+ )
+ eth.blockchain, err = core.NewBlockChain(chainDb, cacheConfig, eth.chainConfig, eth.engine, vmConfig)
if err != nil {
return nil, err
}
lass='deletions'>-3/+5 * Convert a bunch of USE_BZIP2 to USES=tar:bzip2adamw2014-07-301-2/+1 * Update to 1.2.2rakuco2014-01-262-3/+3 * - Update to 1.2.1.rakuco2013-12-164-67/+8 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-1/+1 * - Update to 1.2.0.rakuco2013-09-024-23/+64 * - Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0 * Update to 1.1.4rakuco2013-06-042-3/+3 * Set LICENSErakuco2013-04-301-0/+2 * Update gtk-oxygen-engine to 1.3.3 and gtk3-oxygen-engine to 1.1.3.rakuco2013-04-302-3/+3 * Finish converting the whole ports tree to USES=pkgconfigbapt2013-04-231-2/+1 * Update to 1.1.2 now that we have a recent enough GTK+ 3.rakuco2013-03-263-6/+5 * - convert USE_CMAKE to USESmakc2013-03-231-1/+1 * Use USE_PKGCONFIG and remove lib version numbers in the dependencies.rakuco2013-02-041-3/+4 * Clean up the headers of the ports I maintain.rakuco2012-10-071-5/+1 * - update png to 1.5.10dinoex2012-06-011-0/+1 * Update to 1.0.3.rakuco2012-04-162-3/+3 * Update to 1.0.2.rakuco2012-03-212-3/+3 * Update to 1.0.1.rakuco2012-02-192-3/+3 * Add version 1.0.0 of x11-themes/gtk3-oxygen-engine.rakuco2012-01-313-25/+22 * Update to 1.2.0.rakuco2012-01-192-5/+5 * Update to 1.1.6.rakuco2011-12-16