Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Refactor fees into separate SRML module to avoid hack #2052

Closed
gavofyork opened this issue Mar 20, 2019 · 0 comments · Fixed by #7497
Closed

Refactor fees into separate SRML module to avoid hack #2052

gavofyork opened this issue Mar 20, 2019 · 0 comments · Fixed by #7497
Labels
I7-refactor Code needs refactoring. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Milestone

Comments

@gavofyork
Copy link
Member

gavofyork commented Mar 20, 2019

From srml/balances module:

Somewhat ugly hack in order to gain access to module's increase_total_issuance_by
using only the Subtrait (which defines only the types that are not dependent
on Positive/NegativeImbalance). Subtrait must be used otherwise we end up with a
circular dependency with Trait having some types be dependent on PositiveImbalance
and PositiveImbalance itself depending back on Trait for its Drop impl (and thus
its type declaration).

This works as long as increase_total_issuance_by doesn't use the Imbalance
types (basically for charging fees).

This should eventually be refactored so that the three type items that do
depend on the Imbalance type (TransactionPayment, TransferPayment, DustRemoval)
are placed in their own SRML module.

@gavofyork gavofyork added I7-refactor Code needs refactoring. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Mar 20, 2019
@gavofyork gavofyork added this to the As-and-when milestone Mar 20, 2019
@joepetrowski joepetrowski self-assigned this Apr 3, 2019
@joepetrowski joepetrowski removed their assignment Jun 19, 2019
@shawntabrizi shawntabrizi mentioned this issue Feb 12, 2020
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants