mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Update polkadot & substrate (#112)
This commit is contained in:
Generated
+904
-923
File diff suppressed because it is too large
Load Diff
@@ -24,14 +24,13 @@ use sc_cli::{
|
|||||||
SubstrateCli,
|
SubstrateCli,
|
||||||
};
|
};
|
||||||
use sc_executor::NativeExecutionDispatch;
|
use sc_executor::NativeExecutionDispatch;
|
||||||
use sc_service::config::PrometheusConfig;
|
use sc_service::config::{BasePath, PrometheusConfig};
|
||||||
use sp_core::hexdisplay::HexDisplay;
|
use sp_core::hexdisplay::HexDisplay;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
traits::{Block as BlockT, Hash as HashT, Header as HeaderT, Zero},
|
traits::{Block as BlockT, Hash as HashT, Header as HeaderT, Zero},
|
||||||
BuildStorage,
|
BuildStorage,
|
||||||
};
|
};
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::path::PathBuf;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
impl SubstrateCli for Cli {
|
impl SubstrateCli for Cli {
|
||||||
@@ -210,10 +209,11 @@ pub fn run() -> Result<()> {
|
|||||||
.chain(cli.relaychain_args.iter()),
|
.chain(cli.relaychain_args.iter()),
|
||||||
);
|
);
|
||||||
|
|
||||||
polkadot_cli.base_path = cli.run.base_path()?.map(|x| x.join("polkadot"));
|
|
||||||
|
|
||||||
runner.run_full_node(
|
runner.run_full_node(
|
||||||
|config| {
|
|config| {
|
||||||
|
polkadot_cli.base_path =
|
||||||
|
config.base_path.as_ref().map(|x| x.path().join("polkadot"));
|
||||||
|
|
||||||
let task_executor = config.task_executor.clone();
|
let task_executor = config.task_executor.clone();
|
||||||
let polkadot_config = SubstrateCli::create_configuration(
|
let polkadot_config = SubstrateCli::create_configuration(
|
||||||
&polkadot_cli,
|
&polkadot_cli,
|
||||||
@@ -249,8 +249,12 @@ impl CliConfiguration for PolkadotCli {
|
|||||||
self.base.base.keystore_params()
|
self.base.base.keystore_params()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn base_path(&self) -> Result<Option<PathBuf>> {
|
fn base_path(&self) -> Result<Option<BasePath>> {
|
||||||
Ok(self.shared_params().base_path().or(self.base_path.clone()))
|
Ok(self
|
||||||
|
.shared_params()
|
||||||
|
.base_path()
|
||||||
|
.or_else(|| self.base_path.clone().map(Into::into))
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rpc_http(&self) -> Result<Option<SocketAddr>> {
|
fn rpc_http(&self) -> Result<Option<SocketAddr>> {
|
||||||
|
|||||||
@@ -46,9 +46,15 @@ macro_rules! new_full_start {
|
|||||||
crate::service::Executor,
|
crate::service::Executor,
|
||||||
>($config)?
|
>($config)?
|
||||||
.with_select_chain(|_config, backend| Ok(sc_consensus::LongestChain::new(backend.clone())))?
|
.with_select_chain(|_config, backend| Ok(sc_consensus::LongestChain::new(backend.clone())))?
|
||||||
.with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
|
.with_transaction_pool(|builder| {
|
||||||
let pool_api = Arc::new(sc_transaction_pool::FullChainApi::new(client.clone()));
|
let pool_api = Arc::new(sc_transaction_pool::FullChainApi::new(
|
||||||
let pool = sc_transaction_pool::BasicPool::new(config, pool_api, prometheus_registry);
|
builder.client().clone(),
|
||||||
|
));
|
||||||
|
let pool = sc_transaction_pool::BasicPool::new(
|
||||||
|
builder.config().transaction_pool.clone(),
|
||||||
|
pool_api,
|
||||||
|
builder.prometheus_registry(),
|
||||||
|
);
|
||||||
Ok(pool)
|
Ok(pool)
|
||||||
})?
|
})?
|
||||||
.with_import_queue(|
|
.with_import_queue(|
|
||||||
@@ -101,7 +107,7 @@ pub fn run_collator(
|
|||||||
.with_block_announce_validator(|_client| {
|
.with_block_announce_validator(|_client| {
|
||||||
Box::new(block_announce_validator_copy)
|
Box::new(block_announce_validator_copy)
|
||||||
})?
|
})?
|
||||||
.build()?;
|
.build_full()?;
|
||||||
|
|
||||||
let registry = service.prometheus_registry();
|
let registry = service.prometheus_registry();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user