File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
blockifier/src/blockifier Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ impl ProcessTxBlockingTask {
203203 let mut validator = self
204204 . stateful_tx_validator
205205 . instantiate_validator ( self . state_reader_factory . as_ref ( ) , & self . chain_info ) ?;
206+ // TODO(Arni): Use the _l2_gas_price reject transactions that do not pass the gas price
207+ // threshold.
208+ // TODO(Arni): get next_l2_gas_price from the block header.
209+ let _l2_gas_price =
210+ validator. block_context ( ) . block_info ( ) . gas_prices . strk_gas_prices . l2_gas_price ;
206211 let address = executable_tx. contract_address ( ) ;
207212 let nonce = validator. get_nonce ( address) . map_err ( |e| {
208213 error ! ( "Failed to get nonce for sender address {}: {}" , address, e) ;
Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ impl<S: StateReader> StatefulValidator<S> {
7979 Ok ( ( ) )
8080 }
8181
82+ pub fn block_context ( & self ) -> & BlockContext {
83+ self . tx_executor . block_context . as_ref ( )
84+ }
85+
8286 fn state ( & mut self ) -> & mut CachedState < S > {
8387 self . tx_executor . block_state . as_mut ( ) . expect ( BLOCK_STATE_ACCESS_ERR )
8488 }
You can’t perform that action at this time.
0 commit comments