mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +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,11 +22,15 @@
|
||||
|
||||
use pallet_transaction_payment::CurrencyAdapter;
|
||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||
use primitives::v1::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
|
||||
CoreState, GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage,
|
||||
Moment, Nonce, OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes,
|
||||
SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex,
|
||||
use primitives::{
|
||||
v1::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
|
||||
CoreState, GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage,
|
||||
InboundHrmpMessage, Moment, Nonce, OccupiedCoreAssumption, PersistedValidationData,
|
||||
ScrapedOnChainVotes, Signature, ValidationCode, ValidationCodeHash, ValidatorId,
|
||||
ValidatorIndex,
|
||||
},
|
||||
v2::SessionInfo,
|
||||
};
|
||||
use runtime_common::{
|
||||
assigned_slots, auctions, crowdloan, impls::ToAuthor, paras_registrar, paras_sudo_wrapper,
|
||||
@@ -1306,7 +1310,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl primitives::v1::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
impl primitives::v2::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
fn validators() -> Vec<ValidatorId> {
|
||||
parachains_runtime_api_impl::validators::<Runtime>()
|
||||
}
|
||||
@@ -1388,7 +1392,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
|
||||
fn submit_pvf_check_statement(
|
||||
stmt: primitives::v1::PvfCheckStatement,
|
||||
stmt: primitives::v2::PvfCheckStatement,
|
||||
signature: primitives::v1::ValidatorSignature,
|
||||
) {
|
||||
parachains_runtime_api_impl::submit_pvf_check_statement::<Runtime>(stmt, signature)
|
||||
|
||||
Reference in New Issue
Block a user