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.

Decouple TransactionPayment from polynomial #11278

@kianenigma

Description

@kianenigma

Sorry @nazar-pc I deleted my comment cause I didnt read any code, but now I did.

It is strange to me that there is a WeightToFeePolynomial trait at all.

Seems the trait should simply be WeightToFee with a single function fn calc that should be implemented, and this is what should be required in the pallet.

Then there should be a subtrait WeightToFeePolynomial, or just a struct, which implements WeightToFee but in the case of a polynomial.

Does that make sense? Then you can simply have Identity be the true identity without any polynomial bs.

Originally posted by @shawntabrizi in #11226 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I7-refactorCode needs refactoring.J0-enhancementAn additional feature request.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions