Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Dec 22, 2024
1 parent 088c645 commit 2e6dfbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion substrate/frame/balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ mod impl_fungible;
mod tests;
mod types;

#[cfg(feature = "try-runtime")]
use frame::try_runtime::prelude::*;
pub use impl_currency::{NegativeImbalance, PositiveImbalance};
pub use pallet::*;
pub use types::{
Expand Down Expand Up @@ -547,7 +549,7 @@ pub mod pallet {
}

#[cfg(feature = "try-runtime")]
fn try_state(_n: BlockNumberFor<T>) -> Result<(), sp_runtime::TryRuntimeError> {
fn try_state(_n: BlockNumberFor<T>) -> Result<(), TryRuntimeError> {
Holds::<T, I>::iter_keys().try_for_each(|k| {
if Holds::<T, I>::decode_len(k).unwrap_or(0) >
T::RuntimeHoldReason::VARIANT_COUNT as usize
Expand Down
4 changes: 3 additions & 1 deletion substrate/frame/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ pub mod prelude {

#[cfg(any(feature = "try-runtime", test))]
pub mod try_runtime {
pub use sp_runtime::TryRuntimeError;
pub mod prelude {
pub use sp_runtime::TryRuntimeError;
}
}

/// Prelude to be included in the `benchmarking.rs` of a pallet.
Expand Down

0 comments on commit 2e6dfbe

Please sign in to comment.