mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
node, node-template: disable GRANDPA observer (#5011)
* node-template: disable grandpa observer * node: disable grandpa observer * node: add doc about grandpa-voter infallible task * grandpa: remove grandpa observer from public API * grandpa: ignore observer_enabled field in config
This commit is contained in:
@@ -96,7 +96,6 @@ mod voting_rule;
|
||||
pub use finality_proof::FinalityProofProvider;
|
||||
pub use justification::GrandpaJustification;
|
||||
pub use light_import::light_block_import;
|
||||
pub use observer::run_grandpa_observer;
|
||||
pub use voting_rule::{
|
||||
BeforeBestBlockBy, ThreeQuartersOfTheUnfinalizedChain, VotingRule, VotingRulesBuilder
|
||||
};
|
||||
@@ -551,7 +550,7 @@ pub fn run_grandpa_voter<B, E, Block: BlockT, N, RA, SC, VR, X>(
|
||||
Client<B, E, Block, RA>: AuxStore,
|
||||
{
|
||||
let GrandpaParams {
|
||||
config,
|
||||
mut config,
|
||||
link,
|
||||
network,
|
||||
inherent_data_providers,
|
||||
@@ -560,6 +559,12 @@ pub fn run_grandpa_voter<B, E, Block: BlockT, N, RA, SC, VR, X>(
|
||||
voting_rule,
|
||||
} = grandpa_params;
|
||||
|
||||
// NOTE: we have recently removed `run_grandpa_observer` from the public
|
||||
// API, I felt it is easier to just ignore this field rather than removing
|
||||
// it from the config temporarily. This should be removed after #5013 is
|
||||
// fixed and we re-add the observer to the public API.
|
||||
config.observer_enabled = false;
|
||||
|
||||
let LinkHalf {
|
||||
client,
|
||||
select_chain,
|
||||
|
||||
@@ -150,6 +150,9 @@ fn grandpa_observer<B, E, Block: BlockT, RA, S, F>(
|
||||
/// listening for and validating GRANDPA commits instead of following the full
|
||||
/// protocol. Provide configuration and a link to a block import worker that has
|
||||
/// already been instantiated with `block_import`.
|
||||
/// NOTE: this is currently not part of the crate's public API since we don't consider
|
||||
/// it stable enough to use on a live network.
|
||||
#[allow(unused)]
|
||||
pub fn run_grandpa_observer<B, E, Block: BlockT, N, RA, SC>(
|
||||
config: Config,
|
||||
link: LinkHalf<B, E, Block, RA, SC>,
|
||||
|
||||
@@ -1376,7 +1376,7 @@ fn finalize_3_voters_1_light_observer() {
|
||||
|
||||
run_to_completion_with(&mut runtime, 20, net.clone(), authorities, |executor| {
|
||||
executor.spawn(
|
||||
run_grandpa_observer(
|
||||
observer::run_grandpa_observer(
|
||||
Config {
|
||||
gossip_duration: TEST_GOSSIP_DURATION,
|
||||
justification_period: 32,
|
||||
|
||||
Reference in New Issue
Block a user