mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Apply an initial set of rustfmt rules
This commit is contained in:
@@ -5,9 +5,7 @@ use sp_core::{sr25519, Pair, Public};
|
||||
|
||||
use sp_runtime::traits::IdentifyAccount;
|
||||
|
||||
use serai_runtime::{
|
||||
WASM_BINARY, AccountId, Signature, GenesisConfig, SystemConfig, BalancesConfig
|
||||
};
|
||||
use serai_runtime::{WASM_BINARY, AccountId, Signature, GenesisConfig, SystemConfig, BalancesConfig};
|
||||
|
||||
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;
|
||||
type AccountPublic = <Signature as Verify>::Signer;
|
||||
@@ -17,58 +15,53 @@ fn get_from_seed<TPublic: Public>(seed: &'static str) -> <TPublic::Pair as Pair>
|
||||
}
|
||||
|
||||
fn get_account_id_from_seed<TPublic: Public>(seed: &'static str) -> AccountId
|
||||
where AccountPublic: From<<TPublic::Pair as Pair>::Public> {
|
||||
where
|
||||
AccountPublic: From<<TPublic::Pair as Pair>::Public>,
|
||||
{
|
||||
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
|
||||
}
|
||||
|
||||
fn testnet_genesis(
|
||||
wasm_binary: &[u8],
|
||||
endowed_accounts: Vec<AccountId>
|
||||
) -> GenesisConfig {
|
||||
fn testnet_genesis(wasm_binary: &[u8], endowed_accounts: Vec<AccountId>) -> GenesisConfig {
|
||||
GenesisConfig {
|
||||
system: SystemConfig {
|
||||
code: wasm_binary.to_vec(),
|
||||
},
|
||||
system: SystemConfig { code: wasm_binary.to_vec() },
|
||||
balances: BalancesConfig {
|
||||
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
|
||||
},
|
||||
transaction_payment: Default::default()
|
||||
transaction_payment: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn development_config() -> Result<ChainSpec, &'static str> {
|
||||
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available")?;
|
||||
|
||||
Ok(
|
||||
ChainSpec::from_genesis(
|
||||
// Name
|
||||
"Development Network",
|
||||
// ID
|
||||
"dev",
|
||||
ChainType::Development,
|
||||
|| {
|
||||
testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
]
|
||||
)
|
||||
},
|
||||
// Bootnodes
|
||||
vec![],
|
||||
// Telemetry
|
||||
None,
|
||||
// Protocol ID
|
||||
Some("serai"),
|
||||
// Fork ID
|
||||
None,
|
||||
// Properties
|
||||
None,
|
||||
// Extensions
|
||||
None
|
||||
)
|
||||
)
|
||||
Ok(ChainSpec::from_genesis(
|
||||
// Name
|
||||
"Development Network",
|
||||
// ID
|
||||
"dev",
|
||||
ChainType::Development,
|
||||
|| {
|
||||
testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
|
||||
],
|
||||
)
|
||||
},
|
||||
// Bootnodes
|
||||
vec![],
|
||||
// Telemetry
|
||||
None,
|
||||
// Protocol ID
|
||||
Some("serai"),
|
||||
// Fork ID
|
||||
None,
|
||||
// Properties
|
||||
None,
|
||||
// Extensions
|
||||
None,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::{
|
||||
chain_spec,
|
||||
cli::{Cli, Subcommand},
|
||||
command_helper::{BenchmarkExtrinsicBuilder, inherent_benchmark_data},
|
||||
service
|
||||
service,
|
||||
};
|
||||
|
||||
impl SubstrateCli for Cli {
|
||||
@@ -41,7 +41,7 @@ impl SubstrateCli for Cli {
|
||||
fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
match id {
|
||||
"dev" => Ok(Box::new(chain_spec::development_config()?)),
|
||||
_ => panic!("Unknown network ID")
|
||||
_ => panic!("Unknown network ID"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,119 +58,83 @@ pub fn run() -> sc_cli::Result<()> {
|
||||
|
||||
Some(Subcommand::BuildSpec(cmd)) => {
|
||||
cli.create_runner(cmd)?.sync_run(|config| cmd.run(config.chain_spec, config.network))
|
||||
},
|
||||
}
|
||||
|
||||
Some(Subcommand::CheckBlock(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents {
|
||||
client,
|
||||
task_manager,
|
||||
import_queue,
|
||||
..
|
||||
} = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, import_queue), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::CheckBlock(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, import_queue, .. } =
|
||||
service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, import_queue), task_manager))
|
||||
}),
|
||||
|
||||
Some(Subcommand::ExportBlocks(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, config.database), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::ExportBlocks(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, config.database), task_manager))
|
||||
}),
|
||||
|
||||
Some(Subcommand::ExportState(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, config.chain_spec), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::ExportState(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, .. } = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, config.chain_spec), task_manager))
|
||||
}),
|
||||
|
||||
Some(Subcommand::ImportBlocks(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents {
|
||||
client,
|
||||
task_manager,
|
||||
import_queue,
|
||||
..
|
||||
} = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, import_queue), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::ImportBlocks(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, import_queue, .. } =
|
||||
service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, import_queue), task_manager))
|
||||
}),
|
||||
|
||||
Some(Subcommand::PurgeChain(cmd)) => {
|
||||
cli.create_runner(cmd)?.sync_run(|config| cmd.run(config.database))
|
||||
},
|
||||
}
|
||||
|
||||
Some(Subcommand::Revert(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents {
|
||||
client,
|
||||
task_manager,
|
||||
backend,
|
||||
..
|
||||
} = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, backend, None), task_manager))
|
||||
})
|
||||
},
|
||||
Some(Subcommand::Revert(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, backend, .. } = service::new_partial(&config)?;
|
||||
Ok((cmd.run(client, backend, None), task_manager))
|
||||
}),
|
||||
|
||||
Some(Subcommand::Benchmark(cmd)) => {
|
||||
cli.create_runner(cmd)?.sync_run(|config| {
|
||||
match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) => {
|
||||
cmd.run::<Block, service::ExecutorDispatch>(config)
|
||||
},
|
||||
Some(Subcommand::Benchmark(cmd)) => cli.create_runner(cmd)?.sync_run(|config| match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) => cmd.run::<Block, service::ExecutorDispatch>(config),
|
||||
|
||||
BenchmarkCmd::Block(cmd) => {
|
||||
cmd.run(service::new_partial(&config)?.client)
|
||||
},
|
||||
BenchmarkCmd::Block(cmd) => cmd.run(service::new_partial(&config)?.client),
|
||||
|
||||
BenchmarkCmd::Storage(cmd) => {
|
||||
let PartialComponents { client, backend, .. } = service::new_partial(&config)?;
|
||||
cmd.run(config, client, backend.expose_db(), backend.expose_storage())
|
||||
},
|
||||
BenchmarkCmd::Storage(cmd) => {
|
||||
let PartialComponents { client, backend, .. } = service::new_partial(&config)?;
|
||||
cmd.run(config, client, backend.expose_db(), backend.expose_storage())
|
||||
}
|
||||
|
||||
BenchmarkCmd::Overhead(cmd) => {
|
||||
let client = service::new_partial(&config)?.client;
|
||||
cmd.run(
|
||||
config,
|
||||
client.clone(),
|
||||
inherent_benchmark_data()?,
|
||||
Arc::new(BenchmarkExtrinsicBuilder::new(client))
|
||||
)
|
||||
},
|
||||
BenchmarkCmd::Overhead(cmd) => {
|
||||
let client = service::new_partial(&config)?.client;
|
||||
cmd.run(
|
||||
config,
|
||||
client.clone(),
|
||||
inherent_benchmark_data()?,
|
||||
Arc::new(BenchmarkExtrinsicBuilder::new(client)),
|
||||
)
|
||||
}
|
||||
|
||||
BenchmarkCmd::Machine(cmd) => cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())
|
||||
}
|
||||
})
|
||||
},
|
||||
BenchmarkCmd::Machine(cmd) => cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()),
|
||||
}),
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
Some(Subcommand::TryRuntime(cmd)) => {
|
||||
cli.create_runner(cmd)?.async_run(|config| {
|
||||
Ok(
|
||||
(
|
||||
cmd.run::<Block, service::ExecutorDispatch>(config),
|
||||
sc_service::TaskManager::new(
|
||||
config.tokio_handle.clone(),
|
||||
config.prometheus_config.as_ref().map(|cfg| &cfg.registry)
|
||||
).map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?
|
||||
)
|
||||
Some(Subcommand::TryRuntime(cmd)) => cli.create_runner(cmd)?.async_run(|config| {
|
||||
Ok((
|
||||
cmd.run::<Block, service::ExecutorDispatch>(config),
|
||||
sc_service::TaskManager::new(
|
||||
config.tokio_handle.clone(),
|
||||
config.prometheus_config.as_ref().map(|cfg| &cfg.registry),
|
||||
)
|
||||
})
|
||||
},
|
||||
.map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?,
|
||||
))
|
||||
}),
|
||||
|
||||
#[cfg(not(feature = "try-runtime"))]
|
||||
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node".into()),
|
||||
|
||||
Some(Subcommand::ChainInfo(cmd)) => {
|
||||
cli.create_runner(cmd)?.sync_run(|config| cmd.run::<Block>(&config))
|
||||
},
|
||||
|
||||
None => {
|
||||
cli.create_runner(&cli.run)?.run_node_until_exit(|config| async {
|
||||
service::new_full(config).map_err(sc_cli::Error::Service)
|
||||
})
|
||||
}
|
||||
|
||||
None => cli.create_runner(&cli.run)?.run_node_until_exit(|config| async {
|
||||
service::new_full(config).map_err(sc_cli::Error::Service)
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ use runtime::SystemCall;
|
||||
use crate::service::FullClient;
|
||||
|
||||
pub struct BenchmarkExtrinsicBuilder {
|
||||
client: Arc<FullClient>
|
||||
client: Arc<FullClient>,
|
||||
}
|
||||
|
||||
impl BenchmarkExtrinsicBuilder {
|
||||
@@ -26,16 +26,12 @@ impl BenchmarkExtrinsicBuilder {
|
||||
|
||||
impl frame_benchmarking_cli::ExtrinsicBuilder for BenchmarkExtrinsicBuilder {
|
||||
fn remark(&self, nonce: u32) -> std::result::Result<OpaqueExtrinsic, &'static str> {
|
||||
Ok(
|
||||
OpaqueExtrinsic::from(
|
||||
create_benchmark_extrinsic(
|
||||
self.client.as_ref(),
|
||||
Sr25519Keyring::Bob.pair(),
|
||||
SystemCall::remark { remark: vec![] }.into(),
|
||||
nonce
|
||||
)
|
||||
)
|
||||
)
|
||||
Ok(OpaqueExtrinsic::from(create_benchmark_extrinsic(
|
||||
self.client.as_ref(),
|
||||
Sr25519Keyring::Bob.pair(),
|
||||
SystemCall::remark { remark: vec![] }.into(),
|
||||
nonce,
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,17 +46,15 @@ pub fn create_benchmark_extrinsic(
|
||||
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
|
||||
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
|
||||
frame_system::CheckGenesis::<runtime::Runtime>::new(),
|
||||
frame_system::CheckEra::<runtime::Runtime>::from(
|
||||
sp_runtime::generic::Era::mortal(
|
||||
u64::from(
|
||||
runtime::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2)
|
||||
),
|
||||
client.chain_info().best_number.into(),
|
||||
)
|
||||
),
|
||||
frame_system::CheckEra::<runtime::Runtime>::from(sp_runtime::generic::Era::mortal(
|
||||
u64::from(
|
||||
runtime::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2),
|
||||
),
|
||||
client.chain_info().best_number.into(),
|
||||
)),
|
||||
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
|
||||
frame_system::CheckWeight::<runtime::Runtime>::new(),
|
||||
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0)
|
||||
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
|
||||
);
|
||||
|
||||
runtime::UncheckedExtrinsic::new_signed(
|
||||
@@ -79,8 +73,9 @@ pub fn create_benchmark_extrinsic(
|
||||
(),
|
||||
(),
|
||||
(),
|
||||
)
|
||||
).using_encoded(|e| sender.sign(e))
|
||||
),
|
||||
)
|
||||
.using_encoded(|e| sender.sign(e)),
|
||||
),
|
||||
extra,
|
||||
)
|
||||
|
||||
@@ -14,21 +14,25 @@ use serai_runtime::{opaque::Block, AccountId, Balance, Index};
|
||||
pub struct FullDeps<C, P> {
|
||||
pub client: Arc<C>,
|
||||
pub pool: Arc<P>,
|
||||
pub deny_unsafe: DenyUnsafe
|
||||
pub deny_unsafe: DenyUnsafe,
|
||||
}
|
||||
|
||||
pub fn create_full<
|
||||
C: ProvideRuntimeApi<Block> +
|
||||
HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockchainError> +
|
||||
Send + Sync + 'static,
|
||||
P: TransactionPool + 'static
|
||||
C: ProvideRuntimeApi<Block>
|
||||
+ HeaderBackend<Block>
|
||||
+ HeaderMetadata<Block, Error = BlockchainError>
|
||||
+ Send
|
||||
+ Sync
|
||||
+ 'static,
|
||||
P: TransactionPool + 'static,
|
||||
>(
|
||||
deps: FullDeps<C, P>
|
||||
deps: FullDeps<C, P>,
|
||||
) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>
|
||||
where C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index> +
|
||||
pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance> +
|
||||
BlockBuilder<Block> {
|
||||
|
||||
where
|
||||
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ BlockBuilder<Block>,
|
||||
{
|
||||
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
|
||||
use substrate_frame_rpc_system::{System, SystemApiServer};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ type PartialComponents = sc_service::PartialComponents<
|
||||
|
||||
pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceError> {
|
||||
if config.keystore_remote.is_some() {
|
||||
return Err(ServiceError::Other("Remote Keystores are not supported".to_string()))
|
||||
return Err(ServiceError::Other("Remote Keystores are not supported".to_string()));
|
||||
}
|
||||
|
||||
let telemetry = config
|
||||
@@ -39,19 +39,15 @@ pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceE
|
||||
config.wasm_method,
|
||||
config.default_heap_pages,
|
||||
config.max_runtime_instances,
|
||||
config.runtime_cache_size
|
||||
config.runtime_cache_size,
|
||||
);
|
||||
|
||||
let (
|
||||
client,
|
||||
backend,
|
||||
keystore_container,
|
||||
task_manager
|
||||
) = sc_service::new_full_parts::<Block, RuntimeApi, _>(
|
||||
config,
|
||||
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
|
||||
executor
|
||||
)?;
|
||||
let (client, backend, keystore_container, task_manager) =
|
||||
sc_service::new_full_parts::<Block, RuntimeApi, _>(
|
||||
config,
|
||||
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
|
||||
executor,
|
||||
)?;
|
||||
let client = Arc::new(client);
|
||||
|
||||
let telemetry = telemetry.map(|(worker, telemetry)| {
|
||||
@@ -66,28 +62,26 @@ pub fn new_partial(config: &Configuration) -> Result<PartialComponents, ServiceE
|
||||
config.role.is_authority().into(),
|
||||
config.prometheus_registry(),
|
||||
task_manager.spawn_essential_handle(),
|
||||
client.clone()
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
let import_queue = serai_consensus::import_queue(
|
||||
&task_manager,
|
||||
client.clone(),
|
||||
select_chain.clone(),
|
||||
config.prometheus_registry()
|
||||
config.prometheus_registry(),
|
||||
)?;
|
||||
|
||||
Ok(
|
||||
sc_service::PartialComponents {
|
||||
client,
|
||||
backend,
|
||||
task_manager,
|
||||
import_queue,
|
||||
keystore_container,
|
||||
select_chain,
|
||||
transaction_pool,
|
||||
other: telemetry,
|
||||
}
|
||||
)
|
||||
Ok(sc_service::PartialComponents {
|
||||
client,
|
||||
backend,
|
||||
task_manager,
|
||||
import_queue,
|
||||
keystore_container,
|
||||
select_chain,
|
||||
transaction_pool,
|
||||
other: telemetry,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
@@ -99,11 +93,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
keystore_container,
|
||||
select_chain,
|
||||
other: mut telemetry,
|
||||
transaction_pool
|
||||
transaction_pool,
|
||||
} = new_partial(&config)?;
|
||||
|
||||
let (network, system_rpc_tx, network_starter) = sc_service::build_network(
|
||||
sc_service::BuildNetworkParams {
|
||||
let (network, system_rpc_tx, network_starter) =
|
||||
sc_service::build_network(sc_service::BuildNetworkParams {
|
||||
config: &config,
|
||||
client: client.clone(),
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
@@ -111,8 +105,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
import_queue,
|
||||
block_announce_validator_builder: None,
|
||||
warp_sync: None,
|
||||
}
|
||||
)?;
|
||||
})?;
|
||||
|
||||
if config.offchain_worker.enabled {
|
||||
sc_service::build_offchain_workers(
|
||||
@@ -130,29 +123,28 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
let client = client.clone();
|
||||
let pool = transaction_pool.clone();
|
||||
|
||||
Box::new(
|
||||
move |deny_unsafe, _| {
|
||||
crate::rpc::create_full(
|
||||
crate::rpc::FullDeps { client: client.clone(), pool: pool.clone(), deny_unsafe }
|
||||
).map_err(Into::into)
|
||||
}
|
||||
)
|
||||
Box::new(move |deny_unsafe, _| {
|
||||
crate::rpc::create_full(crate::rpc::FullDeps {
|
||||
client: client.clone(),
|
||||
pool: pool.clone(),
|
||||
deny_unsafe,
|
||||
})
|
||||
.map_err(Into::into)
|
||||
})
|
||||
};
|
||||
|
||||
sc_service::spawn_tasks(
|
||||
sc_service::SpawnTasksParams {
|
||||
network: network.clone(),
|
||||
client: client.clone(),
|
||||
keystore: keystore_container.sync_keystore(),
|
||||
task_manager: &mut task_manager,
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
rpc_builder: rpc_extensions_builder,
|
||||
backend,
|
||||
system_rpc_tx,
|
||||
config,
|
||||
telemetry: telemetry.as_mut(),
|
||||
}
|
||||
)?;
|
||||
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
|
||||
network: network.clone(),
|
||||
client: client.clone(),
|
||||
keystore: keystore_container.sync_keystore(),
|
||||
task_manager: &mut task_manager,
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
rpc_builder: rpc_extensions_builder,
|
||||
backend,
|
||||
system_rpc_tx,
|
||||
config,
|
||||
telemetry: telemetry.as_mut(),
|
||||
})?;
|
||||
|
||||
if role.is_authority() {
|
||||
serai_consensus::authority(
|
||||
@@ -161,7 +153,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||
network,
|
||||
transaction_pool,
|
||||
select_chain,
|
||||
prometheus_registry.as_ref()
|
||||
prometheus_registry.as_ref(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user