diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index 229aa3a9be..0f09940a4c 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -94,7 +94,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 251, - impl_version: 1, + impl_version: 2, apis: RUNTIME_API_VERSIONS, transaction_version: 1, }; diff --git a/substrate/frame/evm/src/lib.rs b/substrate/frame/evm/src/lib.rs index eab3c80a93..c5df79fdb8 100644 --- a/substrate/frame/evm/src/lib.rs +++ b/substrate/frame/evm/src/lib.rs @@ -158,7 +158,7 @@ pub struct GenesisAccount { decl_storage! { trait Store for Module as EVM { Accounts get(fn accounts): map hasher(blake2_128_concat) H160 => Account; - AccountCodes: map hasher(blake2_128_concat) H160 => Vec; + AccountCodes get(fn account_codes): map hasher(blake2_128_concat) H160 => Vec; AccountStorages: double_map hasher(blake2_128_concat) H160, hasher(blake2_128_concat) H256 => H256; } @@ -288,6 +288,8 @@ decl_module! { gas_price: U256, nonce: Option, ) -> DispatchResult { + ensure!(gas_price >= T::FeeCalculator::min_gas_price(), Error::::GasPriceTooLow); + let sender = ensure_signed(origin)?; let source = T::ConvertAccountId::convert_account_id(&sender); @@ -318,6 +320,8 @@ decl_module! { gas_price: U256, nonce: Option, ) -> DispatchResult { + ensure!(gas_price >= T::FeeCalculator::min_gas_price(), Error::::GasPriceTooLow); + let sender = ensure_signed(origin)?; let source = T::ConvertAccountId::convert_account_id(&sender); @@ -350,6 +354,8 @@ decl_module! { gas_price: U256, nonce: Option, ) -> DispatchResult { + ensure!(gas_price >= T::FeeCalculator::min_gas_price(), Error::::GasPriceTooLow); + let sender = ensure_signed(origin)?; let source = T::ConvertAccountId::convert_account_id(&sender); @@ -498,8 +504,6 @@ impl Module { ) -> Result> where F: FnOnce(&mut StackExecutor>) -> (R, ExitReason), { - ensure!(gas_price >= T::FeeCalculator::min_gas_price(), Error::::GasPriceTooLow); - let vicinity = Vicinity { gas_price, origin: source,