[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:
Roman Useinov
2023-02-09 12:47:39 +01:00
committed by GitHub
parent 214d1c0cc3
commit 03e9f43f1d
13 changed files with 46 additions and 30 deletions
@@ -562,7 +562,8 @@ pub trait SortedListProvider<AccountId> {
/// unbounded amount of storage accesses.
fn unsafe_clear();
/// Check internal state of list. Only meant for debugging.
/// Check internal state of the list. Only meant for debugging.
#[cfg(feature = "try-runtime")]
fn try_state() -> Result<(), &'static str>;
/// If `who` changes by the returned amount they are guaranteed to have a worst case change