@@ -15,7 +15,6 @@ use starknet_api::state::StorageKey;
1515use starknet_api:: transaction:: { InvokeTransaction , Transaction , TransactionHash } ;
1616use starknet_core:: types:: ContractClass as StarknetContractClass ;
1717use starknet_types_core:: felt:: Felt ;
18- use tracing:: warn;
1918
2019use crate :: errors:: { ReexecutionError , ReexecutionResult } ;
2120use crate :: state_reader:: reexecution_state_reader:: ReexecutionStateReader ;
@@ -48,39 +47,21 @@ impl StateReader for SimulatedStateReader {
4847 ) -> StateResult < Felt > {
4948 match self . state_maps . storage . get ( & ( contract_address, key) ) {
5049 Some ( value) => Ok ( * value) ,
51- None => {
52- warn ! (
53- "Storage key not found in prefetched state, falling back to RPC \
54- (contract_address: {contract_address}, key: {key:?})."
55- ) ;
56- self . rpc_state_reader . get_storage_at ( contract_address, key)
57- }
50+ None => self . rpc_state_reader . get_storage_at ( contract_address, key) ,
5851 }
5952 }
6053
6154 fn get_nonce_at ( & self , contract_address : ContractAddress ) -> StateResult < Nonce > {
6255 match self . state_maps . nonces . get ( & contract_address) {
6356 Some ( value) => Ok ( * value) ,
64- None => {
65- warn ! (
66- "Nonce not found in prefetched state, falling back to RPC (contract_address: \
67- {contract_address})."
68- ) ;
69- self . rpc_state_reader . get_nonce_at ( contract_address)
70- }
57+ None => self . rpc_state_reader . get_nonce_at ( contract_address) ,
7158 }
7259 }
7360
7461 fn get_class_hash_at ( & self , contract_address : ContractAddress ) -> StateResult < ClassHash > {
7562 match self . state_maps . class_hashes . get ( & contract_address) {
7663 Some ( value) => Ok ( * value) ,
77- None => {
78- warn ! (
79- "Class hash not found in prefetched state, falling back to RPC \
80- (contract_address: {contract_address})."
81- ) ;
82- self . rpc_state_reader . get_class_hash_at ( contract_address)
83- }
64+ None => self . rpc_state_reader . get_class_hash_at ( contract_address) ,
8465 }
8566 }
8667
@@ -109,13 +90,7 @@ impl FetchCompiledClasses for SimulatedStateReader {
10990 fn is_declared ( & self , class_hash : ClassHash ) -> StateResult < bool > {
11091 match self . state_maps . declared_contracts . get ( & class_hash) {
11192 Some ( value) => Ok ( * value) ,
112- None => {
113- warn ! (
114- "Declared contract not found in prefetched state, falling back to RPC \
115- (class_hash: {class_hash})."
116- ) ;
117- self . rpc_state_reader . is_declared ( class_hash)
118- }
93+ None => self . rpc_state_reader . is_declared ( class_hash) ,
11994 }
12095 }
12196}
0 commit comments