@@ -24,7 +24,7 @@ use polkadot_sdk::{
2424 sc_client_api:: { Backend , BlockBackend } ,
2525 sc_executor:: WasmExecutor ,
2626 sc_network_sync:: strategy:: warp:: WarpSyncProvider ,
27- sc_service:: { error:: Error as ServiceError , Configuration , TaskManager , WarpSyncConfig } ,
27+ sc_service:: { Configuration , TaskManager , WarpSyncConfig , error:: Error as ServiceError } ,
2828 sc_telemetry:: { Telemetry , TelemetryHandle , TelemetryWorker } ,
2929 sc_transaction_pool_api:: OffchainTransactionPoolFactory ,
3030 sp_consensus_aura:: sr25519:: AuthorityPair ,
@@ -34,11 +34,11 @@ use polkadot_sdk::{
3434use torus_runtime:: { apis:: RuntimeApi , configs:: eth:: TransactionConverter , opaque:: Block } ;
3535
3636use crate :: cli:: {
37+ Consensus ,
3738 eth:: {
38- db_config_dir , new_frontier_partial , spawn_frontier_tasks , EthConfiguration ,
39- FrontierPartialComponents ,
39+ EthConfiguration , FrontierPartialComponents , db_config_dir , new_frontier_partial ,
40+ spawn_frontier_tasks ,
4041 } ,
41- Consensus ,
4242} ;
4343
4444type HostFunctions = sp_io:: SubstrateHostFunctions ;
@@ -165,9 +165,8 @@ type AuraData = Pin<
165165
166166fn aura_data_provider (
167167 slot_duration : sp_consensus_aura:: SlotDuration ,
168- eth_config : & EthConfiguration ,
168+ target_gas_price : u64 ,
169169) -> impl Fn ( sp_core:: H256 , ( ) ) -> AuraData {
170- let target_gas_price = eth_config. target_gas_price ;
171170 move |_, ( ) | {
172171 Box :: pin ( async move {
173172 let timestamp = sp_timestamp:: InherentDataProvider :: from_system_time ( ) ;
@@ -198,7 +197,10 @@ fn build_aura_grandpa_import_queue(
198197 block_import : grandpa_block_import. clone ( ) ,
199198 justification_import : Some ( Box :: new ( grandpa_block_import. clone ( ) ) ) ,
200199 client,
201- create_inherent_data_providers : aura_data_provider ( slot_duration, eth_config) ,
200+ create_inherent_data_providers : aura_data_provider (
201+ slot_duration,
202+ eth_config. target_gas_price ,
203+ ) ,
202204 spawner : & task_manager. spawn_essential_handle ( ) ,
203205 registry : config. prometheus_registry ( ) ,
204206 check_for_equivocation : Default :: default ( ) ,
@@ -350,7 +352,10 @@ pub async fn new_full<Network: sc_network::NetworkBackend<Block, <Block as Block
350352 proposer_factory : proposer,
351353 sync_oracle : sync_service. clone ( ) ,
352354 justification_sync_link : sync_service. clone ( ) ,
353- create_inherent_data_providers : aura_data_provider ( slot_duration, & eth_config) ,
355+ create_inherent_data_providers : aura_data_provider (
356+ slot_duration,
357+ eth_config. target_gas_price ,
358+ ) ,
354359 force_authoring : config. force_authoring ,
355360 backoff_authoring_blocks : Option :: < ( ) > :: None ,
356361 keystore : keystore_container. keystore ( ) ,
@@ -550,7 +555,7 @@ pub async fn new_full<Network: sc_network::NetworkBackend<Block, <Block as Block
550555 forced_parent_hashes : None ,
551556 pending_create_inherent_data_providers : aura_data_provider (
552557 slot_duration,
553- & eth_config,
558+ eth_config. target_gas_price ,
554559 ) ,
555560 } ;
556561
@@ -578,7 +583,7 @@ pub async fn new_full<Network: sc_network::NetworkBackend<Block, <Block as Block
578583 tx_handler_controller,
579584 sync_service : sync_service. clone ( ) ,
580585 config,
581- telemetry : telemetry . as_mut ( ) ,
586+ telemetry : Option :: as_mut ( & mut telemetry ) ,
582587 } ) ?;
583588
584589 spawn_frontier_tasks (
0 commit comments