Configurable state cache size and enforce exact state cache size (#2314)

* Allow configuring state cache size via cli

* Track used cache size

* Expose memory counter to informant

* Enforce max cache size constraint exactly

* Default to 64 MiB

Co-Authored-By: cmichi <mich@elmueller.net>

* Remove self as parameter
This commit is contained in:
Michael Müller authored and Gavin Wood committed 2019-04-23 18:47:11 +01:00
1 parent 3f06fe32f3
commit c6d15e2cea
11 files changed
+131 -12

No files matched your search

+1
View File
@@ -112,6 +112,7 @@ fn node_config<F: ServiceFactory> (
keystore_path: root.join("key").to_str().unwrap().into(),
database_path: root.join("db").to_str().unwrap().into(),
database_cache_size: None,
state_cache_size: 16777216,
pruning: Default::default(),
keys: keys,
chain_spec: (*spec).clone(),