Skip to content

Commit

Permalink
empty block_hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
xqft committed Oct 30, 2024
1 parent dae9e1e commit bbf1c18
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions crates/vm/execution_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,6 @@ impl ExecutionDB {
storage.insert(address, account_storage);
}

let earliest_number = store_wrapper
.store
.get_earliest_block_number()?
.ok_or(ExecutionDBError::NewMissingBlockNumber())?;
let latest_number = store_wrapper
.store
.get_latest_block_number()?
.ok_or(ExecutionDBError::NewMissingBlockNumber())?;

let numbers = earliest_number..=latest_number;
let hashes = numbers
.clone()
.map(|number| store_wrapper.block_hash(number))
.collect::<Result<Vec<_>, _>>()?
.into_iter();
block_hashes.extend(numbers.zip(hashes));

Ok(Self {
accounts,
code,
Expand Down

0 comments on commit bbf1c18

Please sign in to comment.