Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <x@acg.box>
  • Loading branch information
AurevoirXavier committed Sep 24, 2024
1 parent ffc971f commit 4c4df22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pallet/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,8 @@ pub mod pallet {
// let cs_from_contract = Self::elect_from_contract(n1)?;
// let cs_from_pallet = Self::elect(n2)?;
let cs_from_contract = Self::elect_from_contract(n1).unwrap_or_default();
let cs_from_pallet = Self::elect(n2).unwrap_or_default()
let cs_from_pallet = Self::elect(n2)
.unwrap_or_default()
.into_iter()
.filter(|c| !cs_from_contract.contains(c))
.collect();
Expand Down
6 changes: 4 additions & 2 deletions pallet/staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,10 @@ impl crate::Election<AccountId> for RingStaking {
if Session::set_keys(
RuntimeOrigin::signed(who),
SessionKeys { uint: i.into() },
Vec::new()
).is_ok() {
Vec::new(),
)
.is_ok()
{
who
} else {
AccountId(0)
Expand Down
2 changes: 1 addition & 1 deletion runtime/crab/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn migrate() -> frame_support::weights::Weight {
<darwinia_staking::RingStakingContract<Runtime>>::put(who);
}

darwinia_staking::MigrationStartPoint::put(darwinia_staking::now());
<darwinia_staking::MigrationStartPoint<Runtime>>::put(darwinia_staking::now::<Runtime>());

// frame_support::weights::Weight::zero()
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(7, 7)
Expand Down
2 changes: 1 addition & 1 deletion runtime/darwinia/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn migrate() -> frame_support::weights::Weight {
<darwinia_staking::RingStakingContract<Runtime>>::put(who);
}

darwinia_staking::MigrationStartPoint::put(darwinia_staking::now());
<darwinia_staking::MigrationStartPoint<Runtime>>::put(darwinia_staking::now::<Runtime>());

// frame_support::weights::Weight::zero()
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(7, 107)
Expand Down

0 comments on commit 4c4df22

Please sign in to comment.