Fix runtime benchmarks build (#929)

This commit is contained in:
Shawn Tabrizi
2020-03-23 20:09:37 +01:00
committed by GitHub
parent 6ac200252e
commit 9283855dba
6 changed files with 30 additions and 25 deletions
+3 -4
View File
@@ -122,17 +122,17 @@ decl_storage! {
// This allows for type-safe usage of the Substrate storage database, so you can
// keep things around between blocks.
trait Store for Module<T: Trait> as Claims {
Claims get(claims) build(|config: &GenesisConfig<T>| {
Claims get(fn claims) build(|config: &GenesisConfig<T>| {
config.claims.iter().map(|(a, b)| (a.clone(), b.clone())).collect::<Vec<_>>()
}): map hasher(identity) EthereumAddress => Option<BalanceOf<T>>;
Total get(total) build(|config: &GenesisConfig<T>| {
Total get(fn total) build(|config: &GenesisConfig<T>| {
config.claims.iter().fold(Zero::zero(), |acc: BalanceOf<T>, &(_, n)| acc + n)
}): BalanceOf<T>;
/// Vesting schedule for a claim.
/// First balance is the total amount that should be held for vesting.
/// Second balance is how much should be unlocked per block.
/// The block number is when the vesting should start.
Vesting get(vesting) config():
Vesting get(fn vesting) config():
map hasher(identity) EthereumAddress
=> Option<(BalanceOf<T>, BalanceOf<T>, T::BlockNumber)>;
}
@@ -285,7 +285,6 @@ impl<T: Trait> Module<T> {
}
}
#[allow(deprecated)] // Allow `ValidateUnsigned`
impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> {
type Call = Call<T>;