Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fredrik/polkadot_v0…
Browse files Browse the repository at this point in the history
….9.29
  • Loading branch information
simonsso committed Oct 12, 2022
2 parents b30bedc + b31de4b commit 44e38a3
Show file tree
Hide file tree
Showing 14 changed files with 199 additions and 140 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Nodle <support@nodle.com>", "Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2021"
name = "nodle-parachain"
version = "2.0.22"
version = "2.0.24"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion pallets/allocations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-allocations"
version = "2.0.22"
version = "2.0.24"
authors = ['Eliott Teissonniere <git.eliott@teissonniere.org>']
edition = "2021"
description = "A pallet to handle the Proof Of Connectivity allocations rewards"
Expand Down
20 changes: 15 additions & 5 deletions pallets/allocations/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) {
}

benchmarks! {
batch {
allocate {
let b in 1..T::MaxAllocs::get();

let batch_arg = make_batch::<T>(b);
Expand All @@ -61,24 +61,34 @@ benchmarks! {
assert!(members.try_push(oracle.clone()).is_ok());
<BenchmarkOracles<T>>::put(&members);
<SessionQuota<T>>::put(T::ExistentialDeposit::get() * (b * ALLOC_FACTOR).into());
}: _(RawOrigin::Signed(oracle), batch_arg)
}:{
let _ = Allocations::<T>::allocate(batch_arg);
}

calc_quota {
}: {
Allocations::<T>::checked_calc_session_quota(Zero::zero(), true);
Allocations::<T>::checked_calc_session_quota(Zero::zero());
}
verify {
assert_last_event::<T>(Event::SessionQuotaCalculated(<NextSessionQuota<T>>::get().unwrap()).into())
assert_last_event::<T>(Event::SessionQuotaCalculated(<NextSessionQuota<T>>::get()).into())
}

renew_quota {
}: {
Allocations::<T>::checked_renew_session_quota(Zero::zero(), true);
Allocations::<T>::checked_renew_session_quota(Zero::zero());
}
verify {
assert_last_event::<T>(Event::SessionQuotaRenewed.into())
}

checked_update_session_quota {
}:{
Allocations::<T>::checked_update_session_quota();
}
verify {
assert_eq!(frame_system::Pallet::<T>::events().len(), 2);
}

set_curve_starting_block {
}: _(RawOrigin::Root, One::one())
verify {
Expand Down

0 comments on commit 44e38a3

Please sign in to comment.