Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit 59167f3

Browse files
committed
Minor doc tweaks
1 parent 0f80b7b commit 59167f3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ethcore/src/state/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ impl State {
538538
let mut addresses = self.cache.borrow_mut();
539539
trace!("Committing cache {:?} entries", addresses.len());
540540
for (address, a) in addresses.drain().filter(|&(_, ref a)| a.state == AccountState::Committed || a.state == AccountState::CleanFresh) {
541-
self.db.cache_account(address, a.account, a.state == AccountState::Committed);
541+
self.db.add_to_account_cache(address, a.account, a.state == AccountState::Committed);
542542
}
543543
}
544544

ethcore/src/state_db.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub const ACCOUNT_BLOOM_HASHCOUNT_KEY: &'static [u8] = b"account_hash_count";
3838
struct AccountCache {
3939
/// DB Account cache. `None` indicates that account is known to be missing.
4040
accounts: LruCache<Address, Option<Account>>,
41-
/// Accounts changed in recently committed blocks. Ordered by block number.
41+
/// Information on the modifications in recently committed blocks; specifically which addresses
42+
/// changed in which block. Ordered by block number.
4243
modifications: VecDeque<BlockChanges>,
4344
}
4445

@@ -69,11 +70,12 @@ struct BlockChanges {
6970
}
7071

7172
/// State database abstraction.
72-
/// Manages shared global state cache.
73+
/// Manages shared global state cache which reflects the canonical
74+
/// state as it is on the disk. All the entries in the cache are clean.
7375
/// A clone of `StateDB` may be created as canonical or not.
74-
/// For canonical clones cache changes are accumulated and applied
75-
/// on commit.
76-
/// For non-canonical clones cache is cleared on commit.
76+
/// For canonical clones local cache is accumulated and applied
77+
/// in `sync_cache`
78+
/// For non-canonical clones local cache is dropped.
7779
///
7880
/// Global cache propagation.
7981
/// After a `State` object has been committed to the trie it

0 commit comments

Comments
 (0)