mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 23:11:08 +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:
@@ -32,9 +32,12 @@ use sp_keyring::Sr25519Keyring;
|
||||
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
|
||||
|
||||
use polkadot_node_primitives::{DisputeMessage, SignedDisputeStatement};
|
||||
use polkadot_primitives::v1::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, Hash, SessionIndex, SessionInfo,
|
||||
ValidatorId, ValidatorIndex,
|
||||
use polkadot_primitives::{
|
||||
v1::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, Hash, SessionIndex, ValidatorId,
|
||||
ValidatorIndex,
|
||||
},
|
||||
v2::SessionInfo,
|
||||
};
|
||||
use polkadot_primitives_test_helpers::dummy_candidate_descriptor;
|
||||
|
||||
@@ -86,6 +89,7 @@ pub static ref MOCK_SESSION_INFO: SessionInfo =
|
||||
n_delay_tranches: 0,
|
||||
no_show_slots: 0,
|
||||
needed_approvals: 0,
|
||||
active_validator_indices: vec![],
|
||||
};
|
||||
|
||||
/// `SessionInfo` for the second session. (No more validators, but two more authorities.
|
||||
@@ -105,6 +109,7 @@ pub static ref MOCK_NEXT_SESSION_INFO: SessionInfo =
|
||||
n_delay_tranches: 0,
|
||||
no_show_slots: 0,
|
||||
needed_approvals: 0,
|
||||
active_validator_indices: vec![],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,9 @@ use polkadot_node_network_protocol::{
|
||||
IfDisconnected,
|
||||
};
|
||||
use polkadot_node_primitives::{CandidateVotes, UncheckedDisputeMessage};
|
||||
use polkadot_primitives::v1::{
|
||||
AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex, SessionInfo,
|
||||
use polkadot_primitives::{
|
||||
v1::{AuthorityDiscoveryId, CandidateHash, Hash, SessionIndex},
|
||||
v2::SessionInfo,
|
||||
};
|
||||
use polkadot_subsystem::{
|
||||
messages::{
|
||||
|
||||
Reference in New Issue
Block a user