Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
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

@shawntabrizi

Description

@shawntabrizi

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:

/// 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.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions