Skip to content

Commit

Permalink
Fix runtime migration (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong authored Dec 23, 2021
1 parent 9290d4f commit 755fe00
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions runtime/bifrost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1979,14 +1979,22 @@ impl OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
Ok(())
}

#[cfg(feature = "try-runtime")]
fn on_runtime_upgrade() -> Weight {
log::info!("Bifrost `on_runtime_upgrade`...");
log::info!("Bifrost `on_runtime_upgrade finished`");
Salp::set_multisig_account(ConfirmMuitiSigAccount::get());
SalpLite::set_multisig_account(PolkaConfirmAsMultiSig::get());
log::info!("Bifrost `on_runtime_upgrade finished`");
RocksDbWeight::get().writes(1)
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
let mut account = Salp::multisig_confirm_account();
log::info!("after salp migration multisig account as {}", account);
account = SalpLite::multisig_confirm_account();
log::info!("after salp-lite migration multisig account as {}", account);
Ok(())
}
}

struct CheckInherents;
Expand Down

0 comments on commit 755fe00

Please sign in to comment.