Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Oct 27, 2023
1 parent fbe4c4d commit 12d01fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pallets/dapp-staking-v3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,8 @@ pub mod pallet {

let mut ledger = Ledger::<T>::get(&account);


// TODO: suggestion is to change this a bit so we clean up ledger if rewards have expired
// 1.
// Increase stake amount for the next era & current period in staker's ledger
ledger
Expand All @@ -1002,6 +1004,8 @@ pub mod pallet {
_ => Error::<T>::InternalStakeError,
})?;

// TODO: also change this to check if rewards have expired

// 2.
// Update `StakerInfo` storage with the new stake amount on the specified contract.
//
Expand Down Expand Up @@ -1456,6 +1460,7 @@ pub mod pallet {
Ok(())
}

// TODO: an alternative to this could would be to allow `unstake` call to cleanup old entries, however that means more complexity in that call
/// Used to unstake funds from a contract that was unregistered after an account staked on it.
#[pallet::call_index(15)]
#[pallet::weight(Weight::zero())]
Expand Down

0 comments on commit 12d01fd

Please sign in to comment.