mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 21:27:57 +00:00
* Companion for substrate #13889 * Remove leftover * Remove removed dependency * Remove sp-consensus-vrf from lock * Revert "Remove sp-consensus-vrf from lock" This reverts commit 2269ca1e32df89272e8fd4544292204db387f436. * Fix after substrate modifications * Fix tests to use new VRF Signature type * Don't rely of Deref trait * Fix test * Further code simplification * Reuse garbage_vrf_signature * update lockfile for {"substrate"} --------- Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::tests::test_constants::TEST_CONFIG;
|
||||
use super::*;
|
||||
use polkadot_node_primitives::{
|
||||
approval::{
|
||||
AssignmentCert, AssignmentCertKind, DelayTranche, VRFOutput, VRFProof,
|
||||
AssignmentCert, AssignmentCertKind, DelayTranche, VrfOutput, VrfProof, VrfSignature,
|
||||
RELAY_VRF_MODULO_CONTEXT,
|
||||
},
|
||||
AvailableData, BlockData, PoV,
|
||||
@@ -56,8 +56,8 @@ use super::{
|
||||
approval_db::v1::StoredBlockRange,
|
||||
backend::BackendWriteOp,
|
||||
import::tests::{
|
||||
garbage_vrf, AllowedSlots, BabeEpoch, BabeEpochConfiguration, CompatibleDigestItem, Digest,
|
||||
DigestItem, PreDigest, SecondaryVRFPreDigest,
|
||||
garbage_vrf_signature, AllowedSlots, BabeEpoch, BabeEpochConfiguration,
|
||||
CompatibleDigestItem, Digest, DigestItem, PreDigest, SecondaryVRFPreDigest,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -392,7 +392,7 @@ fn garbage_assignment_cert(kind: AssignmentCertKind) -> AssignmentCert {
|
||||
let (inout, proof, _) = keypair.vrf_sign(ctx.bytes(msg));
|
||||
let out = inout.to_output();
|
||||
|
||||
AssignmentCert { kind, vrf: (VRFOutput(out), VRFProof(proof)) }
|
||||
AssignmentCert { kind, vrf: VrfSignature { output: VrfOutput(out), proof: VrfProof(proof) } }
|
||||
}
|
||||
|
||||
fn sign_approval(
|
||||
@@ -721,9 +721,9 @@ impl ChainBuilder {
|
||||
fn make_header(parent_hash: Hash, slot: Slot, number: u32) -> Header {
|
||||
let digest = {
|
||||
let mut digest = Digest::default();
|
||||
let (vrf_output, vrf_proof) = garbage_vrf();
|
||||
let vrf_signature = garbage_vrf_signature();
|
||||
digest.push(DigestItem::babe_pre_digest(PreDigest::SecondaryVRF(
|
||||
SecondaryVRFPreDigest { authority_index: 0, slot, vrf_output, vrf_proof },
|
||||
SecondaryVRFPreDigest { authority_index: 0, slot, vrf_signature },
|
||||
)));
|
||||
digest
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user