Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Nov 2, 2023
1 parent 7a3c634 commit c47d36e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions pallets/dapp-staking-v3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,7 @@ pub mod pallet {
// TODO - by breaking this into multiple steps, if they are too heavy for a single block, we can distribute them between multiple blocks.
// Benchmarks will show this, but I don't believe it will be needed, especially with increased block capacity we'll get with async backing.
// Even without async backing though, we should have enough capacity to handle this.
// UPDATE: might work with async backing, but right now we could handle up to 150 dApps before exceeding the PoV size.

let tier_config = TierConfig::<T>::get();
let mut dapp_stakes = Vec::with_capacity(IntegratedDApps::<T>::count() as usize);
Expand Down
4 changes: 1 addition & 3 deletions pallets/dapp-staking-v3/src/test/testing_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,7 @@ pub(crate) fn assert_stake(
let pre_contract_stake = pre_snapshot
.contract_stake
.get(&smart_contract)
.map_or(ContractStakeAmount::default(), |series| {
series.clone()
});
.map_or(ContractStakeAmount::default(), |series| series.clone());
let pre_era_info = pre_snapshot.current_era_info;

let stake_era = pre_snapshot.active_protocol_state.era + 1;
Expand Down
1 change: 0 additions & 1 deletion pallets/dapp-staking-v3/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ pub struct AccountLedger<
/// Number of contract stake entries in storage.
#[codec(compact)]
pub contract_stake_count: u32,

// TODO: introduce a variable which keeps track of the latest era for which the rewards have been calculated.
// This is needed since in case we break up reward calculation into multiple blocks, we should prohibit staking until
// reward calculation has finished.
Expand Down

0 comments on commit c47d36e

Please sign in to comment.