mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 16:07:57 +00:00
session-info: add new fields + migration (#4545)
* session_info: v2 + migration * use primitives::v2 * use polkadot_primitives::v2 * impl primitives::v2 * fix approval-voting tests * fix other tests * hook storage migration up * backwards compat (1) * backwards compat (2) * fmt * fix tests * FMT * do not reexport v1 in v2 * fmt * set storage version to 1 Co-authored-by: Javier Viola <javier@parity.io>
This commit is contained in:
@@ -22,10 +22,13 @@ use sp_keyring::Sr25519Keyring;
|
||||
|
||||
use polkadot_erasure_coding::{branches, obtain_chunks_v1 as obtain_chunks};
|
||||
use polkadot_node_primitives::{AvailableData, BlockData, ErasureChunk, PoV, Proof};
|
||||
use polkadot_primitives::v1::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateHash, CommittedCandidateReceipt,
|
||||
GroupIndex, Hash, HeadData, Id as ParaId, OccupiedCore, PersistedValidationData, SessionInfo,
|
||||
ValidatorIndex,
|
||||
use polkadot_primitives::{
|
||||
v1::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateHash, CommittedCandidateReceipt,
|
||||
GroupIndex, Hash, HeadData, Id as ParaId, OccupiedCore, PersistedValidationData,
|
||||
ValidatorIndex,
|
||||
},
|
||||
v2::SessionInfo,
|
||||
};
|
||||
use polkadot_primitives_test_helpers::{
|
||||
dummy_collator, dummy_collator_signature, dummy_hash, dummy_validation_code,
|
||||
@@ -61,6 +64,7 @@ pub fn make_session_info() -> SessionInfo {
|
||||
n_delay_tranches: 0,
|
||||
no_show_slots: 0,
|
||||
needed_approvals: 0,
|
||||
active_validator_indices: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ use polkadot_node_network_protocol::{
|
||||
request_response::{v1, IncomingRequest, OutgoingRequest, Requests},
|
||||
};
|
||||
use polkadot_node_primitives::ErasureChunk;
|
||||
use polkadot_primitives::v1::{
|
||||
CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo,
|
||||
ValidatorIndex,
|
||||
use polkadot_primitives::{
|
||||
v1::{CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, ValidatorIndex},
|
||||
v2::SessionInfo,
|
||||
};
|
||||
use polkadot_subsystem::{
|
||||
messages::{
|
||||
|
||||
Reference in New Issue
Block a user