Skip to content

Commit

Permalink
Replaced internal call to block_header with external call
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Oct 1, 2024
1 parent 4ac710f commit 39cf7f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions starknet-replay/src/storage/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ impl ReplayStorage for RpcStorage {
let old_block_number_and_hash = if work.header.block_number.0 >= 10 {
let block_number_whose_hash_becomes_available =
BlockNumber::new(work.header.block_number.0 - 10);
// TODO: in case of multiple blocks replay, the block hash is already queried
// when the vector of `ReplayBlock` is generated. This data could be reused in a
// shared variabled.
let block_hash = self
.rpc_client
.starknet_get_block_with_tx_hashes(&block_number_whose_hash_becomes_available)?
.get_block_header(block_number_whose_hash_becomes_available)?
.block_hash;

Some(BlockNumberHashPair::new(
Expand Down

0 comments on commit 39cf7f1

Please sign in to comment.