mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 16:31:07 +00:00
Alter BEEFY primitives to prepare for potential BLS integration (#10466)
* Generalize signature. * Fix tests. * Introduce VersionedFinalityProof. * cargo +nightly fmt --all * Rework packing a tad.
This commit is contained in:
@@ -24,7 +24,8 @@ use sp_runtime::traits::{Block, NumberFor};
|
||||
use parking_lot::Mutex;
|
||||
|
||||
/// Stream of signed commitments returned when subscribing.
|
||||
pub type SignedCommitment<Block> = beefy_primitives::SignedCommitment<NumberFor<Block>>;
|
||||
pub type SignedCommitment<Block> =
|
||||
beefy_primitives::SignedCommitment<NumberFor<Block>, beefy_primitives::crypto::Signature>;
|
||||
|
||||
/// Stream of signed commitments returned when subscribing.
|
||||
type SignedCommitmentStream<Block> = TracingUnboundedReceiver<SignedCommitment<Block>>;
|
||||
|
||||
@@ -37,7 +37,7 @@ use sp_runtime::{
|
||||
use beefy_primitives::{
|
||||
crypto::{AuthorityId, Public, Signature},
|
||||
known_payload_ids, BeefyApi, Commitment, ConsensusLog, MmrRootHash, Payload, SignedCommitment,
|
||||
ValidatorSet, VersionedCommitment, VoteMessage, BEEFY_ENGINE_ID, GENESIS_AUTHORITY_SET_ID,
|
||||
ValidatorSet, VersionedFinalityProof, VoteMessage, BEEFY_ENGINE_ID, GENESIS_AUTHORITY_SET_ID,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
@@ -330,7 +330,7 @@ where
|
||||
BlockId::Number(round.1),
|
||||
(
|
||||
BEEFY_ENGINE_ID,
|
||||
VersionedCommitment::V1(signed_commitment.clone()).encode(),
|
||||
VersionedFinalityProof::V1(signed_commitment.clone()).encode(),
|
||||
),
|
||||
)
|
||||
.is_err()
|
||||
|
||||
Reference in New Issue
Block a user