Misc fixes (#11510)

* Misc fixes

Did some code reading and made random changes as I went.

* Update ethcore/src/client/client.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
David
2020-02-23 16:49:17 +01:00
committed by GitHub
parent 2018f5b0ab
commit bbcd094906
10 changed files with 27 additions and 25 deletions

View File

@@ -52,7 +52,9 @@ impl Default for CacheConfig {
}
impl CacheConfig {
/// Creates new cache config with cumulative size equal `total`.
/// Creates new cache config with cumulative size equal to `total`, distributed as follows: 70%
/// to rocksdb, 10% to the blockchain cache and 20% to the state cache. The transaction queue
/// cache size is set to 40Mb and the trace cache to 20Mb.
pub fn new_with_total_cache_size(total: u32) -> Self {
CacheConfig {
db: total * 7 / 10,
@@ -63,14 +65,14 @@ impl CacheConfig {
}
}
/// Creates new cache config with gitven details.
/// Creates new cache config with given details.
pub fn new(db: u32, blockchain: u32, queue: u32, state: u32) -> Self {
CacheConfig {
db: db,
blockchain: blockchain,
queue: queue,
db,
blockchain,
queue,
traces: DEFAULT_TRACE_CACHE_SIZE,
state: state,
state,
}
}