Remove balances migration. (#5224)

* Remove balances migration.

* Remove extraneous code

* Remove old test
This commit is contained in:
Gavin Wood
2020-03-12 14:13:05 +01:00
committed by GitHub
parent 9898fc7e81
commit 6f2aaf9d11
4 changed files with 16 additions and 248 deletions
-23
View File
@@ -157,7 +157,6 @@ mod tests_composite;
mod tests;
#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
mod migration;
use sp_std::prelude::*;
use sp_std::{cmp, result, mem, fmt::Debug, ops::BitOr, convert::Infallible};
@@ -533,28 +532,6 @@ decl_module! {
let dest = T::Lookup::lookup(dest)?;
<Self as Currency<_>>::transfer(&transactor, &dest, value, KeepAlive)?;
}
fn on_runtime_upgrade() {
migration::on_runtime_upgrade::<T, I>();
}
}
}
#[derive(Decode)]
struct OldBalanceLock<Balance, BlockNumber> {
id: LockIdentifier,
amount: Balance,
until: BlockNumber,
reasons: WithdrawReasons,
}
impl<Balance, BlockNumber> OldBalanceLock<Balance, BlockNumber> {
fn upgraded(self) -> (BalanceLock<Balance>, BlockNumber) {
(BalanceLock {
id: self.id,
amount: self.amount,
reasons: self.reasons.into(),
}, self.until)
}
}