Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Sep 22, 2024
1 parent 0b205b0 commit e664131
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/blockchain-tree/src/blockchain_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,8 @@ mod tests {
assert_eq!(*tree.state.block_indices.blocks_to_chain(), block_to_chain);
}
if let Some(fork_to_child) = self.fork_to_child {
let mut x: HashMap<BlockHash, LinkedHashSet<BlockHash>> = HashMap::with_capacity(fork_to_child.len());
let mut x: HashMap<BlockHash, LinkedHashSet<BlockHash>> =
HashMap::with_capacity(fork_to_child.len());
for (key, hash_set) in fork_to_child {
x.insert(key, hash_set.into_iter().collect());
}
Expand Down
3 changes: 2 additions & 1 deletion crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2740,7 +2740,8 @@ mod tests {
let mut blocks_by_number = BTreeMap::new();
let mut state_by_hash = HashMap::with_capacity(blocks.len());
let mut hash_by_number = BTreeMap::new();
let mut parent_to_child: HashMap<B256, HashSet<B256>> = HashMap::with_capacity(blocks.len());
let mut parent_to_child: HashMap<B256, HashSet<B256>> =
HashMap::with_capacity(blocks.len());
let mut parent_hash = B256::ZERO;

for block in &blocks {
Expand Down
3 changes: 2 additions & 1 deletion crates/storage/provider/src/providers/database/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,8 @@ impl<TX: DbTxMut + DbTx, Spec: Send + Sync> HashingWriter for DatabaseProvider<T
hashed_storages.sort_by_key(|(ha, hk, _)| (*ha, *hk));

// Apply values to HashedState, and remove the account if it's None.
let mut hashed_storage_keys: HashMap<B256, BTreeSet<B256>> = HashMap::with_capacity(hashed_storages.len());
let mut hashed_storage_keys: HashMap<B256, BTreeSet<B256>> =
HashMap::with_capacity(hashed_storages.len());
let mut hashed_storage = self.tx.cursor_dup_write::<tables::HashedStorages>()?;
for (hashed_address, key, value) in hashed_storages.into_iter().rev() {
hashed_storage_keys.entry(hashed_address).or_default().insert(key);
Expand Down

0 comments on commit e664131

Please sign in to comment.