referrerpolicy=no-referrer-when-downgrade

Function pallet_staking::dispatchables::restore_ledger

source ·
pub fn restore_ledger<T: Config>(
    stash: T::AccountId,
    maybe_controller: Option<T::AccountId>,
    maybe_total: Option<BalanceOf<T>>,
    maybe_unlocking: Option<BoundedVec<UnlockChunk<BalanceOf<T>>, T::MaxUnlockingChunks>>,
)
Expand description

Restores the state of a ledger which is in an inconsistent state.

The requirements to restore a ledger are the following:

  • The stash is bonded; or
  • The stash is not bonded but it has a staking lock left behind; or
  • If the stash has an associated ledger and its state is inconsistent; or
  • If the ledger is not corrupted but its staking lock is out of sync.

The maybe_* input parameters will overwrite the corresponding data and metadata of the ledger associated with the stash. If the input parameters are not set, the ledger will be reset values from on-chain state.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::restore_ledger.