Skip to content

Improve OnUnbalance trait for better information on the unbalanced amounts #319

Open
@gui1117

Description

@gui1117

Idea from @bkchr paritytech/substrate#8860 (comment)

Allow Unbalance to give a concrete type holding the unbalanced amounts:

Something like:

trait OnUnbalanced<V, R> where R: IntoIterator<Item=V> {
     fn on_unbalanceds<B>(whatever: R) {}
}

For example in transaction-payment we could introduce the struct:

struct TransactionPayment {
    pub fees,
    pub tips,
}

and require an implementation of OnUnbalanced<V, TransactionPayment>

Metadata

Metadata

Assignees

No one assigned

    Labels

    T1-FRAMEThis PR/Issue is related to core FRAME, the framework.

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions