Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <xavier@inv.cafe>
  • Loading branch information
AurevoirXavier committed May 22, 2023
1 parent 637a580 commit 6caab1f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ pub fn run() -> Result<()> {
if chain_spec.is_crab() {
return service::start_dev_node::<CrabRuntimeApi, CrabRuntimeExecutor>(
config,
id,
&eth_rpc_config,
)
.map_err(Into::into);
Expand All @@ -707,6 +708,7 @@ pub fn run() -> Result<()> {
if chain_spec.is_darwinia() {
return service::start_dev_node::<DarwiniaRuntimeApi, DarwiniaRuntimeExecutor>(
config,
id,
&eth_rpc_config,
)
.map_err(Into::into)
Expand All @@ -716,6 +718,7 @@ pub fn run() -> Result<()> {
if chain_spec.is_pangolin() {
return service::start_dev_node::<PangolinRuntimeApi, PangolinRuntimeExecutor>(
config,
id,
&eth_rpc_config,
)
.map_err(Into::into)
Expand All @@ -725,6 +728,7 @@ pub fn run() -> Result<()> {
if chain_spec.is_pangoro() {
return service::start_dev_node::<PangoroRuntimeApi, PangoroRuntimeExecutor>(
config,
id,
&eth_rpc_config,
)
.map_err(Into::into)
Expand Down
2 changes: 1 addition & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct FullDeps<C, P, A: sc_transaction_pool::ChainApi> {
/// The Node authority flag
pub is_authority: bool,
/// Network service
pub network: Arc<sc_network_sync::SyncingService<Block, Hash>>,
pub network: Arc<sc_network_sync::SyncingService<Block>>,
/// EthFilterApi pool.
pub filter_pool: Option<fc_rpc_core::types::FilterPool>,
/// Backend.
Expand Down
3 changes: 1 addition & 2 deletions node/src/service/instant_finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ where
async fn import_block(
&mut self,
mut block_import_params: sc_consensus::BlockImportParams<Block, Self::Transaction>,
cache: std::collections::HashMap<sp_consensus::CacheKeyId, Vec<u8>>,
) -> Result<sc_consensus::ImportResult, Self::Error> {
block_import_params.finalized = true;
self.0.import_block(block_import_params, cache).await
self.0.import_block(block_import_params).await
}
}
6 changes: 2 additions & 4 deletions node/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ where
&sc_service::TaskManager,
Arc<dyn cumulus_relay_chain_interface::RelayChainInterface>,
Arc<sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, Executor>>>,
Arc<sc_network_sync::SyncingService<Block, Hash>>,
Arc<sc_network_sync::SyncingService<Block>>,
sp_keystore::SyncCryptoStorePtr,
bool,
) -> Result<
Expand Down Expand Up @@ -330,9 +330,6 @@ where
spawn_handle: task_manager.spawn_handle(),
relay_chain_interface: relay_chain_interface.clone(),
import_queue,
block_announce_validator_builder: Some(Box::new(|_| {
Box::new(block_announce_validator)
})),
})
.await?;

Expand Down Expand Up @@ -674,6 +671,7 @@ where
/// !!! WARNING: DO NOT USE ELSEWHERE
pub fn start_dev_node<RuntimeApi, Executor>(
mut config: sc_service::Configuration,
para_id: cumulus_primitives_core::ParaId,
eth_rpc_config: &crate::cli::EthRpcConfig,
) -> Result<sc_service::TaskManager, sc_service::error::Error>
where
Expand Down
3 changes: 2 additions & 1 deletion pallet/message-gadget/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl pallet_evm::Config for Runtime {
type CallOrigin = pallet_evm::EnsureAddressRoot<sp_core::H160>;
type ChainId = ();
type Currency = Balances;
type ExtraDataLength = ();
type FeeCalculator = ();
type FindAuthor = ();
type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
Expand All @@ -89,9 +90,9 @@ impl pallet_evm::Config for Runtime {
type PrecompilesType = ();
type PrecompilesValue = ();
type Runner = pallet_evm::runner::stack::Runner<Self>;
type WeightInfo = ();
type RuntimeEvent = RuntimeEvent;
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = ();
type WithdrawOrigin = pallet_evm::EnsureAddressNever<sp_core::H160>;
}
Expand Down
1 change: 1 addition & 0 deletions pallet/message-transact/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ frame_support::parameter_types! {
}

impl pallet_ethereum::Config for TestRuntime {
type ExtraDataLength = ();
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
type StateRoot = IntermediateStateRoot<Self>;
Expand Down
1 change: 1 addition & 0 deletions runtime/crab/src/pallets/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frame_support::parameter_types! {
}

impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
Expand Down
1 change: 1 addition & 0 deletions runtime/darwinia/src/pallets/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frame_support::parameter_types! {
}

impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
Expand Down
1 change: 1 addition & 0 deletions runtime/pangolin/src/pallets/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frame_support::parameter_types! {
}

impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
Expand Down
1 change: 1 addition & 0 deletions runtime/pangoro/src/pallets/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frame_support::parameter_types! {
}

impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
Expand Down

0 comments on commit 6caab1f

Please sign in to comment.