Skip to content

Commit

Permalink
fix: staking register
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqaljn committed May 14, 2024
1 parent c2478db commit d16e013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pallets/sminer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ pub mod pallet {

if miner_info.staking_account == spec_acc {
ensure!(sender == miner, Error::<T>::NotStakingAcc);
T::ReservoirGate::check_qualification(&miner_info.staking_account, collaterals)?;
T::ReservoirGate::check_qualification(&sender, collaterals)?;
}

let mut remaining = collaterals;
Expand Down Expand Up @@ -998,6 +998,8 @@ pub mod pallet {
.try_into().map_err(|_| Error::<T>::Overflow)?;
T::ReservoirGate::check_qualification(&sender, need_staking)?;
T::ReservoirGate::staking(&sender, need_staking, true)?;
let now = <frame_system::Pallet<T>>::block_number();
<StakingStartBlock<T>>::insert(&sender, now);
}

<MinerItems<T>>::insert(
Expand Down
2 changes: 1 addition & 1 deletion standalone/chain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 100,
spec_version: 105,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit d16e013

Please sign in to comment.