mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
[Companion] BEEFY crates renaming (#6799)
* Temporary commit to make the Substrate CI happy * Revert "Temporary commit to make the Substrate CI happy" This reverts commit 9eb2fd223c3e36312242d4fda4ebacf3dd732547. * Align to substrate master * Update lock * Adjust some naming according to the new substrate crates
This commit is contained in:
@@ -351,7 +351,7 @@ type FullGrandpaBlockImport<RuntimeApi, ExecutorDispatch, ChainSelection = FullS
|
||||
>;
|
||||
#[cfg(feature = "full-node")]
|
||||
type FullBeefyBlockImport<RuntimeApi, ExecutorDispatch, InnerBlockImport> =
|
||||
beefy_gadget::import::BeefyBlockImport<
|
||||
beefy::import::BeefyBlockImport<
|
||||
Block,
|
||||
FullBackend,
|
||||
FullClient<RuntimeApi, ExecutorDispatch>,
|
||||
@@ -471,7 +471,7 @@ fn new_partial<RuntimeApi, ExecutorDispatch, ChainSelection>(
|
||||
>,
|
||||
grandpa::LinkHalf<Block, FullClient<RuntimeApi, ExecutorDispatch>, ChainSelection>,
|
||||
babe::BabeLink<Block>,
|
||||
beefy_gadget::BeefyVoterLinks<Block>,
|
||||
beefy::BeefyVoterLinks<Block>,
|
||||
),
|
||||
grandpa::SharedVoterState,
|
||||
sp_consensus_babe::SlotDuration,
|
||||
@@ -514,7 +514,7 @@ where
|
||||
let justification_import = grandpa_block_import.clone();
|
||||
|
||||
let (beefy_block_import, beefy_voter_links, beefy_rpc_links) =
|
||||
beefy_gadget::beefy_block_import_and_links(
|
||||
beefy::beefy_block_import_and_links(
|
||||
grandpa_block_import,
|
||||
backend.clone(),
|
||||
client.clone(),
|
||||
@@ -852,11 +852,11 @@ where
|
||||
.push(grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone()));
|
||||
|
||||
let beefy_gossip_proto_name =
|
||||
beefy_gadget::gossip_protocol_name(&genesis_hash, config.chain_spec.fork_id());
|
||||
beefy::gossip_protocol_name(&genesis_hash, config.chain_spec.fork_id());
|
||||
// `beefy_on_demand_justifications_handler` is given to `beefy-gadget` task to be run,
|
||||
// while `beefy_req_resp_cfg` is added to `config.network.request_response_protocols`.
|
||||
let (beefy_on_demand_justifications_handler, beefy_req_resp_cfg) =
|
||||
beefy_gadget::communication::request_response::BeefyJustifsRequestHandler::new(
|
||||
beefy::communication::request_response::BeefyJustifsRequestHandler::new(
|
||||
&genesis_hash,
|
||||
config.chain_spec.fork_id(),
|
||||
client.clone(),
|
||||
@@ -866,9 +866,7 @@ where
|
||||
config
|
||||
.network
|
||||
.extra_sets
|
||||
.push(beefy_gadget::communication::beefy_peers_set_config(
|
||||
beefy_gossip_proto_name.clone(),
|
||||
));
|
||||
.push(beefy::communication::beefy_peers_set_config(beefy_gossip_proto_name.clone()));
|
||||
config.network.request_response_protocols.push(beefy_req_resp_cfg);
|
||||
}
|
||||
|
||||
@@ -1198,14 +1196,14 @@ where
|
||||
|
||||
if enable_beefy {
|
||||
let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name();
|
||||
let network_params = beefy_gadget::BeefyNetworkParams {
|
||||
let network_params = beefy::BeefyNetworkParams {
|
||||
network: network.clone(),
|
||||
gossip_protocol_name: beefy_gossip_proto_name,
|
||||
justifications_protocol_name,
|
||||
_phantom: core::marker::PhantomData::<Block>,
|
||||
};
|
||||
let payload_provider = beefy_primitives::mmr::MmrRootProvider::new(client.clone());
|
||||
let beefy_params = beefy_gadget::BeefyParams {
|
||||
let beefy_params = beefy::BeefyParams {
|
||||
client: client.clone(),
|
||||
backend: backend.clone(),
|
||||
payload_provider,
|
||||
@@ -1218,7 +1216,7 @@ where
|
||||
on_demand_justifications_handler: beefy_on_demand_justifications_handler,
|
||||
};
|
||||
|
||||
let gadget = beefy_gadget::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params);
|
||||
let gadget = beefy::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params);
|
||||
|
||||
// Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll
|
||||
// bring the node down with it to make sure it is noticed.
|
||||
|
||||
Reference in New Issue
Block a user