mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 08:27:55 +00:00
frame: remove finality-tracker (#7228)
* frame: remove finality-tracker * node: remove unused parameter types * node: bump spec_version
This commit is contained in:
@@ -29,7 +29,6 @@ sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common
|
||||
sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
|
||||
sc-basic-authorship = { version = "0.8.0", path = "../../../client/basic-authorship" }
|
||||
sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
|
||||
sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
|
||||
sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
|
||||
sp-tracing = { version = "2.0.0", path = "../../../primitives/tracing" }
|
||||
hash-db = "0.15.2"
|
||||
|
||||
@@ -51,7 +51,6 @@ grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path
|
||||
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
|
||||
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
|
||||
sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
|
||||
sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
|
||||
sp-inherents = { version = "2.0.0", path = "../../../primitives/inherents" }
|
||||
sp-keyring = { version = "2.0.0", path = "../../../primitives/keyring" }
|
||||
sp-keystore = { version = "0.8.0", path = "../../../primitives/keystore" }
|
||||
|
||||
@@ -318,7 +318,6 @@ pub fn new_full_base(
|
||||
config,
|
||||
link: grandpa_link,
|
||||
network: network.clone(),
|
||||
inherent_data_providers: inherent_data_providers.clone(),
|
||||
telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
|
||||
voting_rule: grandpa::VotingRulesBuilder::default().build(),
|
||||
prometheus_registry,
|
||||
@@ -332,16 +331,16 @@ pub fn new_full_base(
|
||||
grandpa::run_grandpa_voter(grandpa_config)?
|
||||
);
|
||||
} else {
|
||||
grandpa::setup_disabled_grandpa(
|
||||
client.clone(),
|
||||
&inherent_data_providers,
|
||||
network.clone(),
|
||||
)?;
|
||||
grandpa::setup_disabled_grandpa(network.clone())?;
|
||||
}
|
||||
|
||||
network_starter.start_network();
|
||||
Ok(NewFullBase {
|
||||
task_manager, inherent_data_providers, client, network, network_status_sinks,
|
||||
task_manager,
|
||||
inherent_data_providers,
|
||||
client,
|
||||
network,
|
||||
network_status_sinks,
|
||||
transaction_pool,
|
||||
})
|
||||
}
|
||||
@@ -483,7 +482,6 @@ mod tests {
|
||||
traits::Verify,
|
||||
};
|
||||
use sp_timestamp;
|
||||
use sp_finality_tracker;
|
||||
use sp_keyring::AccountKeyring;
|
||||
use sc_service_test::TestNetNode;
|
||||
use crate::service::{new_full_base, new_light_base, NewFullBase};
|
||||
@@ -543,7 +541,6 @@ mod tests {
|
||||
let mut inherent_data = inherent_data_providers
|
||||
.create_inherent_data()
|
||||
.expect("Creates inherent data.");
|
||||
inherent_data.replace_data(sp_finality_tracker::INHERENT_IDENTIFIER, &1u64);
|
||||
|
||||
let parent_id = BlockId::number(service.client().chain_info().best_number);
|
||||
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
|
||||
|
||||
@@ -54,7 +54,6 @@ pallet-contracts-primitives = { version = "2.0.0", default-features = false, pat
|
||||
pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false, path = "../../../frame/contracts/rpc/runtime-api/" }
|
||||
pallet-democracy = { version = "2.0.0", default-features = false, path = "../../../frame/democracy" }
|
||||
pallet-elections-phragmen = { version = "2.0.0", default-features = false, path = "../../../frame/elections-phragmen" }
|
||||
pallet-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../frame/finality-tracker" }
|
||||
pallet-grandpa = { version = "2.0.0", default-features = false, path = "../../../frame/grandpa" }
|
||||
pallet-im-online = { version = "2.0.0", default-features = false, path = "../../../frame/im-online" }
|
||||
pallet-indices = { version = "2.0.0", default-features = false, path = "../../../frame/indices" }
|
||||
@@ -105,7 +104,6 @@ std = [
|
||||
"pallet-democracy/std",
|
||||
"pallet-elections-phragmen/std",
|
||||
"frame-executive/std",
|
||||
"pallet-finality-tracker/std",
|
||||
"pallet-grandpa/std",
|
||||
"pallet-im-online/std",
|
||||
"pallet-indices/std",
|
||||
|
||||
@@ -814,17 +814,6 @@ impl pallet_grandpa::Trait for Runtime {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const WindowSize: BlockNumber = 101;
|
||||
pub const ReportLatency: BlockNumber = 1000;
|
||||
}
|
||||
|
||||
impl pallet_finality_tracker::Trait for Runtime {
|
||||
type OnFinalizationStalled = ();
|
||||
type WindowSize = WindowSize;
|
||||
type ReportLatency = ReportLatency;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const BasicDeposit: Balance = 10 * DOLLARS; // 258 bytes on-chain
|
||||
pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain
|
||||
@@ -927,7 +916,6 @@ construct_runtime!(
|
||||
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
|
||||
Elections: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>},
|
||||
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>},
|
||||
FinalityTracker: pallet_finality_tracker::{Module, Call, Inherent},
|
||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
|
||||
Treasury: pallet_treasury::{Module, Call, Storage, Config, Event<T>},
|
||||
Contracts: pallet_contracts::{Module, Call, Config<T>, Storage, Event<T>},
|
||||
|
||||
@@ -40,7 +40,6 @@ pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
|
||||
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
|
||||
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
|
||||
sp-api = { version = "2.0.0", path = "../../../primitives/api" }
|
||||
sp-finality-tracker = { version = "2.0.0", default-features = false, path = "../../../primitives/finality-tracker" }
|
||||
sp-timestamp = { version = "2.0.0", default-features = false, path = "../../../primitives/timestamp" }
|
||||
sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
|
||||
sc-block-builder = { version = "0.8.0", path = "../../../client/block-builder" }
|
||||
|
||||
@@ -431,10 +431,9 @@ impl BenchDb {
|
||||
let mut inherent_data = InherentData::new();
|
||||
let timestamp = 1 * MinimumPeriod::get();
|
||||
|
||||
inherent_data.put_data(sp_timestamp::INHERENT_IDENTIFIER, ×tamp)
|
||||
inherent_data
|
||||
.put_data(sp_timestamp::INHERENT_IDENTIFIER, ×tamp)
|
||||
.expect("Put timestamp failed");
|
||||
inherent_data.put_data(sp_finality_tracker::INHERENT_IDENTIFIER, &0)
|
||||
.expect("Put finality tracker failed");
|
||||
|
||||
client.runtime_api()
|
||||
.inherent_extrinsics_with_context(
|
||||
|
||||
Reference in New Issue
Block a user