mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
BREAKING - Try-runtime: Use proper error types (#13993)
* Try-state: DispatchResult as return type * try_state for the rest of the pallets * pre_upgrade * post_upgrade * try_runtime_upgrade * fixes * bags-list fix * fix * update test * warning fix * ... * final fixes 🤞 * warning.. * frame-support * warnings * Update frame/staking/src/migrations.rs Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> * fix * fix warning * nit fix * merge fixes * small fix * should be good now * missed these ones * introduce TryRuntimeError and TryRuntimeResult * fixes * fix * removed TryRuntimeResult & made some fixes * fix testsg * tests passing * unnecessary imports * Update frame/assets/src/migration.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> --------- Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -189,6 +189,9 @@ pub use sp_npos_elections::{
|
||||
};
|
||||
pub use traits::NposSolution;
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use sp_runtime::TryRuntimeError;
|
||||
|
||||
// re-export for the solution macro, with the dependencies of the macro.
|
||||
#[doc(hidden)]
|
||||
pub use codec;
|
||||
@@ -564,7 +567,7 @@ pub trait SortedListProvider<AccountId> {
|
||||
|
||||
/// Check internal state of the list. Only meant for debugging.
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn try_state() -> Result<(), &'static str>;
|
||||
fn try_state() -> Result<(), TryRuntimeError>;
|
||||
|
||||
/// If `who` changes by the returned amount they are guaranteed to have a worst case change
|
||||
/// in their list position.
|
||||
|
||||
Reference in New Issue
Block a user