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 <[email protected]>
Co-authored-by: default avatarKian Paimani <[email protected]>
parent 87927bbd
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