Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Jan 6, 2025
1 parent 8db8a04 commit 1f5c05c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion relay/polkadot/tests/ahm/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ use super::*;

#[tokio::test]
async fn account_test() {
let Some(mut ext) = remote_ext_test_setup().await else { return; };
let Some(mut ext) = remote_ext_test_setup().await else {
return;
};

ext.execute_with(|| {
let _ = RcMigrator::obtain_rc_accounts();
Expand Down
8 changes: 3 additions & 5 deletions relay/polkadot/tests/ahm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod accounts;

// Runtime specific imports
// Use general aliases for the imports to make it easier to copy&paste the tests for other runtimes.
use polkadot_runtime::{RcMigrator, Block, Runtime as T, System, *};
use polkadot_runtime::{Block, RcMigrator, Runtime as T, System, *};

// General imports
use remote_externalities::{Builder, Mode, OfflineConfig, RemoteExternalities};
Expand All @@ -34,15 +34,13 @@ use remote_externalities::{Builder, Mode, OfflineConfig, RemoteExternalities};
/// `try-runtime create-snapshot --uri wss://rpc.polkadot.io:443 polkadot.snap`.
async fn remote_ext_test_setup() -> Option<RemoteExternalities<Block>> {
sp_tracing::try_init_simple();
let Some(snap) = std::env::var("SNAP").ok() else{
let Some(snap) = std::env::var("SNAP").ok() else {
return None;
};
let abs = std::path::absolute(snap.clone());

let ext = Builder::<Block>::default()
.mode(Mode::Offline(
OfflineConfig { state_snapshot: snap.clone().into() },
))
.mode(Mode::Offline(OfflineConfig { state_snapshot: snap.clone().into() }))
.build()
.await
.map_err(|e| {
Expand Down

0 comments on commit 1f5c05c

Please sign in to comment.