11use std:: collections:: { BTreeMap , HashMap , HashSet } ;
22
33use blockifier:: context:: BlockContext ;
4+ use blockifier:: state:: state_api:: UpdatableState ;
45use blockifier:: transaction:: transaction_execution:: Transaction ;
56use blockifier_test_utils:: cairo_versions:: { CairoVersion , RunnableCairo1 } ;
67use blockifier_test_utils:: calldata:: create_calldata;
@@ -35,7 +36,6 @@ use starknet_committer::db::facts_db::db::FactsDb;
3536use starknet_patricia_storage:: map_storage:: MapStorage ;
3637use starknet_types_core:: felt:: Felt ;
3738
38- use crate :: state_trait:: FlowTestState ;
3939use crate :: test_manager:: {
4040 block_context_for_flow_tests,
4141 EXPECTED_STRK_FEE_TOKEN_ADDRESS ,
@@ -58,6 +58,10 @@ const STRK_TOKEN_NAME: &[u8] = b"StarkNet Token";
5858const STRK_SYMBOL : & [ u8 ] = b"STRK" ;
5959const STRK_DECIMALS : u8 = 18 ;
6060
61+ /// Trait alias for state readers used in flow tests.
62+ pub ( crate ) trait FlowTestState : Default + UpdatableState + Send { }
63+ impl < S : Default + UpdatableState + Send > FlowTestState for S { }
64+
6165/// Gathers the information needed to execute a flow test.
6266pub ( crate ) struct InitialStateData < S : FlowTestState > {
6367 pub ( crate ) initial_state : InitialState < S > ,
@@ -140,7 +144,7 @@ pub(crate) async fn create_default_initial_state_data<S: FlowTestState, const N:
140144 extra_contracts_addresses,
141145 ) = create_default_initial_state_txs_and_contracts ( extra_contracts) ;
142146 // Execute these 4 txs.
143- let initial_state_reader = S :: create_empty_state ( ) ;
147+ let initial_state_reader = S :: default ( ) ;
144148 let initial_block_number = BlockNumber ( CURRENT_BLOCK_NUMBER ) ;
145149 let use_kzg_da = false ;
146150 let block_context = block_context_for_flow_tests ( initial_block_number, use_kzg_da) ;
0 commit comments