@@ -158,7 +158,7 @@ pub struct GenesisAccount {
158158decl_storage ! {
159159 trait Store for Module <T : Trait > as EVM {
160160 Accounts get( fn accounts) : map hasher( blake2_128_concat) H160 => Account ;
161- AccountCodes : map hasher( blake2_128_concat) H160 => Vec <u8 >;
161+ AccountCodes get ( fn account_codes ) : map hasher( blake2_128_concat) H160 => Vec <u8 >;
162162 AccountStorages : double_map hasher( blake2_128_concat) H160 , hasher( blake2_128_concat) H256 => H256 ;
163163 }
164164
@@ -288,6 +288,8 @@ decl_module! {
288288 gas_price: U256 ,
289289 nonce: Option <U256 >,
290290 ) -> DispatchResult {
291+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
292+
291293 let sender = ensure_signed( origin) ?;
292294 let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
293295
@@ -318,6 +320,8 @@ decl_module! {
318320 gas_price: U256 ,
319321 nonce: Option <U256 >,
320322 ) -> DispatchResult {
323+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
324+
321325 let sender = ensure_signed( origin) ?;
322326 let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
323327
@@ -350,6 +354,8 @@ decl_module! {
350354 gas_price: U256 ,
351355 nonce: Option <U256 >,
352356 ) -> DispatchResult {
357+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
358+
353359 let sender = ensure_signed( origin) ?;
354360 let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
355361
@@ -498,8 +504,6 @@ impl<T: Trait> Module<T> {
498504 ) -> Result < R , Error < T > > where
499505 F : FnOnce ( & mut StackExecutor < Backend < T > > ) -> ( R , ExitReason ) ,
500506 {
501- ensure ! ( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
502-
503507 let vicinity = Vicinity {
504508 gas_price,
505509 origin : source,
0 commit comments