Skip to content
Snippets Groups Projects
Unverified Commit 9db92115 authored by Gonçalo Pestana's avatar Gonçalo Pestana Committed by GitHub
Browse files

More tests and checks confirming that `ledger.controller` is always correct. (#2599)


A bonded ledger fetched with the `StakingLedger` implementation exposes
a method `ledger.controller()` that returns the controller of the
ledger. However, that controller is computed and stored under the
`ledger.controller` field on the fly - i.e when the ledger is fetched
from storage using the `StakingLedger::get` method. The controller field
is never stored in storage.

This PR add a few more tests checks and improves the ledger try-state
checks to make sure these invariants hold true.

---------

Co-authored-by: command-bot <>
Co-authored-by: default avatarBastian Köcher <git@kchr.de>
Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
parent 87927bbd
No related merge requests found
Pipeline #435883 passed with stages
in 40 minutes and 27 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment