Move BEEFY code to consensus (#13484)

* Move beefy primitives to consensus dir
* Move beefy gadget to client consensus folder
* Rename beefy crates
This commit is contained in:
Davide Galassi
2023-02-28 15:56:22 +01:00
committed by GitHub
parent 1eb0cd31b9
commit 1ef9c473e7
47 changed files with 260 additions and 262 deletions
+12 -12
View File
@@ -972,36 +972,36 @@ cfg_if! {
}
}
impl beefy_primitives::BeefyApi<Block> for Runtime {
impl sp_consensus_beefy::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
None
}
fn validator_set() -> Option<beefy_primitives::ValidatorSet<beefy_primitives::crypto::AuthorityId>> {
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<sp_consensus_beefy::crypto::AuthorityId>> {
None
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: beefy_primitives::EquivocationProof<
_equivocation_proof: sp_consensus_beefy::EquivocationProof<
NumberFor<Block>,
beefy_primitives::crypto::AuthorityId,
beefy_primitives::crypto::Signature
sp_consensus_beefy::crypto::AuthorityId,
sp_consensus_beefy::crypto::Signature
>,
_key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof,
_key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
) -> Option<()> { None }
fn generate_key_ownership_proof(
_set_id: beefy_primitives::ValidatorSetId,
_authority_id: beefy_primitives::crypto::AuthorityId,
) -> Option<beefy_primitives::OpaqueKeyOwnershipProof> { None }
_set_id: sp_consensus_beefy::ValidatorSetId,
_authority_id: sp_consensus_beefy::crypto::AuthorityId,
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> { None }
}
impl pallet_beefy_mmr::BeefyMmrApi<Block, beefy_primitives::MmrRootHash> for Runtime {
fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet<beefy_primitives::MmrRootHash> {
impl pallet_beefy_mmr::BeefyMmrApi<Block, sp_consensus_beefy::MmrRootHash> for Runtime {
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<sp_consensus_beefy::MmrRootHash> {
Default::default()
}
fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet<beefy_primitives::MmrRootHash> {
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<sp_consensus_beefy::MmrRootHash> {
Default::default()
}
}