@@ -158,7 +158,7 @@ pub struct GenesisAccount {
158
158
decl_storage ! {
159
159
trait Store for Module <T : Trait > as EVM {
160
160
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 >;
162
162
AccountStorages : double_map hasher( blake2_128_concat) H160 , hasher( blake2_128_concat) H256 => H256 ;
163
163
}
164
164
@@ -288,6 +288,8 @@ decl_module! {
288
288
gas_price: U256 ,
289
289
nonce: Option <U256 >,
290
290
) -> DispatchResult {
291
+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
292
+
291
293
let sender = ensure_signed( origin) ?;
292
294
let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
293
295
@@ -318,6 +320,8 @@ decl_module! {
318
320
gas_price: U256 ,
319
321
nonce: Option <U256 >,
320
322
) -> DispatchResult {
323
+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
324
+
321
325
let sender = ensure_signed( origin) ?;
322
326
let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
323
327
@@ -350,6 +354,8 @@ decl_module! {
350
354
gas_price: U256 ,
351
355
nonce: Option <U256 >,
352
356
) -> DispatchResult {
357
+ ensure!( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
358
+
353
359
let sender = ensure_signed( origin) ?;
354
360
let source = T :: ConvertAccountId :: convert_account_id( & sender) ;
355
361
@@ -498,8 +504,6 @@ impl<T: Trait> Module<T> {
498
504
) -> Result < R , Error < T > > where
499
505
F : FnOnce ( & mut StackExecutor < Backend < T > > ) -> ( R , ExitReason ) ,
500
506
{
501
- ensure ! ( gas_price >= T :: FeeCalculator :: min_gas_price( ) , Error :: <T >:: GasPriceTooLow ) ;
502
-
503
507
let vicinity = Vicinity {
504
508
gas_price,
505
509
origin : source,
0 commit comments