mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 20:35:41 +00:00
[Fix] Try-state feature-gated for BagsList (#13296)
* [Fix] Try-state feature-gated for BagsList * fix comment * fix try_state remote-tests * feature-gate try-state remote test for bags-list * remove try-state from a migration * more SortedListProvider fixes * more fixes * more fixes to allow do_try_state usage in other crates * do-try-state for fuzz * more fixes * more fixes * remove feature-flag * do-try-state * fix review comments * Update frame/bags-list/src/mock.rs Co-authored-by: Anton <anton.kalyaev@gmail.com> --------- Co-authored-by: parity-processbot <> Co-authored-by: Anton <anton.kalyaev@gmail.com>
This commit is contained in:
@@ -274,6 +274,13 @@ pub mod pallet {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "try-runtime", feature = "fuzz"))]
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
pub fn do_try_state() -> Result<(), &'static str> {
|
||||
List::<T, I>::do_try_state()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {
|
||||
/// Move an account from one bag to another, depositing an event on success.
|
||||
///
|
||||
@@ -348,8 +355,9 @@ impl<T: Config<I>, I: 'static> SortedListProvider<T::AccountId> for Pallet<T, I>
|
||||
List::<T, I>::unsafe_regenerate(all, score_of)
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn try_state() -> Result<(), &'static str> {
|
||||
List::<T, I>::try_state()
|
||||
Self::do_try_state()
|
||||
}
|
||||
|
||||
fn unsafe_clear() {
|
||||
|
||||
Reference in New Issue
Block a user