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:
Tomasz Drwięga
2021-12-20 14:57:32 +01:00
committed by GitHub
parent 6eb6fa32fc
commit daa41ea5cc
5 changed files with 64 additions and 57 deletions
+2 -2
View File
@@ -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()