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