mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Update Cumulus to Latest Substrate and Polkadot Master (#1551)
* proposal provider impl for proposals func
* rustfmt
* impl proposals_count fn
* update lockfile for {"substrate", "polkadot"}
* cargo update pallet-alliance
* cargo update deps
* fix for https://github.com/paritytech/substrate/commit/324a18e3c5cbf333672c54f9367f530ea976928d
* update lockfile for {"substrate", "polkadot"}
* fix try runtime feature flags
* update log target
Co-authored-by: parity-processbot <>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -100,8 +100,29 @@ runtime-benchmarks = [
|
||||
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"cumulus-pallet-aura-ext/try-runtime",
|
||||
"cumulus-pallet-dmp-queue/try-runtime",
|
||||
"cumulus-pallet-parachain-system/try-runtime",
|
||||
"cumulus-pallet-xcm/try-runtime",
|
||||
"cumulus-pallet-xcmp-queue/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-try-runtime",
|
||||
"pallet-alliance/try-runtime",
|
||||
"pallet-aura/try-runtime",
|
||||
"pallet-authorship/try-runtime",
|
||||
"pallet-balances/try-runtime",
|
||||
"pallet-collective/try-runtime",
|
||||
"pallet-collator-selection/try-runtime",
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-session/try-runtime",
|
||||
"pallet-sudo/try-runtime",
|
||||
"pallet-timestamp/try-runtime",
|
||||
"pallet-transaction-payment/try-runtime",
|
||||
"pallet-utility/try-runtime",
|
||||
"pallet-xcm/try-runtime",
|
||||
"parachain-info/try-runtime",
|
||||
]
|
||||
std = [
|
||||
"codec/std",
|
||||
|
||||
@@ -20,7 +20,7 @@ use frame_support::{
|
||||
weights::Weight,
|
||||
};
|
||||
use pallet_alliance::{ProposalIndex, ProposalProvider};
|
||||
use sp_std::{boxed::Box, marker::PhantomData};
|
||||
use sp_std::{marker::PhantomData, prelude::*};
|
||||
use xcm::latest::{Fungibility, Junction, NetworkId, Parent};
|
||||
|
||||
type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
|
||||
@@ -134,4 +134,12 @@ where
|
||||
fn proposal_of(proposal_hash: HashOf<T>) -> Option<ProposalOf<T, I>> {
|
||||
pallet_collective::Pallet::<T, I>::proposal_of(proposal_hash)
|
||||
}
|
||||
|
||||
fn proposals() -> Vec<HashOf<T>> {
|
||||
pallet_collective::Pallet::<T, I>::proposals().into_inner()
|
||||
}
|
||||
|
||||
fn proposals_count() -> u32 {
|
||||
pallet_collective::Proposals::<T, I>::decode_len().unwrap_or(0) as u32
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,8 +697,15 @@ impl_runtime_apis! {
|
||||
(weight, RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block_no_check(block: Block) -> Weight {
|
||||
Executive::execute_block_no_check(block)
|
||||
fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight {
|
||||
log::info!(
|
||||
target: "runtime::collectives-polkadot", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}",
|
||||
block.header.number,
|
||||
block.header.hash(),
|
||||
state_root_check,
|
||||
select,
|
||||
);
|
||||
Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user