pallet-evm: customizable chain id (#6537)

This commit is contained in:
Wei Tang
2020-07-01 09:00:12 +02:00
committed by GitHub
parent e61f377617
commit c4f6fbceac
2 changed files with 14 additions and 2 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ use serde::{Serialize, Deserialize};
use codec::{Encode, Decode};
use sp_core::{U256, H256, H160};
use sp_runtime::traits::UniqueSaturatedInto;
use frame_support::traits::Get;
use frame_support::storage::{StorageMap, StorageDoubleMap};
use sha3::{Keccak256, Digest};
use evm::backend::{Backend as BackendT, ApplyBackend, Apply};
@@ -91,7 +92,7 @@ impl<'vicinity, T: Trait> BackendT for Backend<'vicinity, T> {
}
fn chain_id(&self) -> U256 {
U256::from(sp_io::misc::chain_id())
U256::from(T::ChainId::get())
}
fn exists(&self, _address: H160) -> bool {