This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Change stake from the balances module to issuance #1990
Copy link
Copy link
Closed
Labels
I7-refactorCode needs refactoring.Code needs refactoring.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderCan be fixed primarily by duplicating and adapting code by an intermediate coder
Description
Balances module stills refers to "total balance across all accounts" as "total stake" when this is now "total issuance".
Changing all notions of "stake" to "issuance" can be important to prevent confusion with the staking module.
Specifically:
substrate/srml/balances/src/lib.rs
Lines 358 to 369 in 8930f29
| /// Increase TotalIssuance by Value. | |
| pub fn increase_total_stake_by(value: T::Balance) { | |
| if let Some(v) = <Module<T>>::total_issuance().checked_add(&value) { | |
| <TotalIssuance<T>>::put(v); | |
| } | |
| } | |
| /// Decrease TotalIssuance by Value. | |
| pub fn decrease_total_stake_by(value: T::Balance) { | |
| if let Some(v) = <Module<T>>::total_issuance().checked_sub(&value) { | |
| <TotalIssuance<T>>::put(v); | |
| } | |
| } |
Should have updated function names, and all downstream dependencies on these functions will need to be updated.
Additionally, any documentation which references this "stake" term in the context of the balances module should be updated.
Metadata
Metadata
Assignees
Labels
I7-refactorCode needs refactoring.Code needs refactoring.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderCan be fixed primarily by duplicating and adapting code by an intermediate coder