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

Commit

Permalink
Minor doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar committed Oct 7, 2016
1 parent 0f80b7b commit 59167f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ethcore/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ impl State {
let mut addresses = self.cache.borrow_mut();
trace!("Committing cache {:?} entries", addresses.len());
for (address, a) in addresses.drain().filter(|&(_, ref a)| a.state == AccountState::Committed || a.state == AccountState::CleanFresh) {
self.db.cache_account(address, a.account, a.state == AccountState::Committed);
self.db.add_to_account_cache(address, a.account, a.state == AccountState::Committed);
}
}

Expand Down
12 changes: 7 additions & 5 deletions ethcore/src/state_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ pub const ACCOUNT_BLOOM_HASHCOUNT_KEY: &'static [u8] = b"account_hash_count";
struct AccountCache {
/// DB Account cache. `None` indicates that account is known to be missing.
accounts: LruCache<Address, Option<Account>>,
/// Accounts changed in recently committed blocks. Ordered by block number.
/// Information on the modifications in recently committed blocks; specifically which addresses
/// changed in which block. Ordered by block number.
modifications: VecDeque<BlockChanges>,
}

Expand Down Expand Up @@ -69,11 +70,12 @@ struct BlockChanges {
}

/// State database abstraction.
/// Manages shared global state cache.
/// Manages shared global state cache which reflects the canonical
/// state as it is on the disk. All the entries in the cache are clean.
/// A clone of `StateDB` may be created as canonical or not.
/// For canonical clones cache changes are accumulated and applied
/// on commit.
/// For non-canonical clones cache is cleared on commit.
/// For canonical clones local cache is accumulated and applied
/// in `sync_cache`
/// For non-canonical clones local cache is dropped.
///
/// Global cache propagation.
/// After a `State` object has been committed to the trie it
Expand Down

0 comments on commit 59167f3

Please sign in to comment.