Skip to content

Commit

Permalink
Merge & fix
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <[email protected]>
  • Loading branch information
AurevoirXavier committed Jul 25, 2024
2 parents b5827bb + 9c8b0fc commit 3de8ac1
Show file tree
Hide file tree
Showing 21 changed files with 786 additions and 461 deletions.
49 changes: 25 additions & 24 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion pallet/account-migration/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ impl darwinia_deposit::Config for Runtime {
impl darwinia_staking::Config for Runtime {
type Currency = Balances;
type Deposit = Deposit;
type ElectionResultProvider = ();
type IssuingManager = ();
type Kton = Dummy;
type KtonRewardDistributionContract = ();
type MaxDeposits = ();
type RewardToKton = ();
type RewardToRing = ();
type Ring = Dummy;
type RuntimeEvent = RuntimeEvent;
type ShouldEndSession = ();
Expand Down
15 changes: 12 additions & 3 deletions pallet/staking/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// darwinia
use crate::*;
use darwinia_deposit::SimpleAsset;
use dc_types::UNIT;
use dc_primitives::UNIT;
// polkadot-sdk
use frame_benchmarking::v2;
use frame_system::RawOrigin;
Expand Down Expand Up @@ -162,16 +162,25 @@ mod benchmarks {
fn set_rate_limit() {
// Worst-case scenario:
//
// Set max unstake ring successfully.
// Set successfully.
#[extrinsic_call]
_(RawOrigin::Root, 1);
}

#[benchmark]
fn set_kton_reward_distribution_contract() {
// Worst-case scenario:
//
// Set successfully.
#[extrinsic_call]
_(RawOrigin::Root, frame_benchmarking::whitelisted_caller::<T::AccountId>());
}

#[benchmark]
fn set_collator_count() {
// Worst-case scenario:
//
// Set collator count successfully.
// Set successfully.
#[extrinsic_call]
_(RawOrigin::Root, 1);
}
Expand Down
Loading

0 comments on commit 3de8ac1

Please sign in to comment.