-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Application has the following staking fields
// Identifier for stake that may possibly be established for role.
// Will be set iff the role staking policy of the corresponding opening
// states so AND application is not inactive.
pub active_role_staking_id: Option<StakeId>,
// Identifier for stake that may possibly be established for application
// Will be set iff the application staking policy of the corresponding opening
// states so.
pub active_application_staking_id: Option<StakeId>,The key point to this issue is that these are mutable, and are used to indicate whether there is indeed any active staking for the given prupose in the corresponding application. However, this is redundant, as one could simply inspect the state of the underlying Stake object from the staking module (are these exposed @mnaamani ? ), and be able to derive this fact.
This does not mean we can remove them, as they are needed to know the binding between the application and the stakes, however their role as mutable state indicators should be changed. They should just represent any stake that was put up for the given purpose at all, and even when the application is indactive, the indicators remain. This has some historical value also, although that is not the main point.
Be aware, they still must be options so long as #3 issue is not addressed as some applications will never have stake set for the given purpose.