Skip to content

Commit

Permalink
fix(starknet_state_sync): change marker verify from casm to state (#2979
Browse files Browse the repository at this point in the history
)
  • Loading branch information
noamsp-starkware authored Dec 26, 2024
1 parent 5895682 commit 13d63e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/starknet_state_sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ impl StateSync {
class_hash: ClassHash,
) -> StateSyncResult<ContractClass> {
let txn = self.storage_reader.begin_ro_txn()?;
let latest_block_number = txn.get_compiled_class_marker()?.prev();
if latest_block_number.is_none_or(|latest_block_number| latest_block_number < block_number)
{
return Err(StateSyncError::BlockNotFound(block_number));
}
verify_synced_up_to(&txn, block_number)?;

let state_reader = txn.get_state_reader()?;

Expand Down

0 comments on commit 13d63e5

Please sign in to comment.