Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Improve feePlanTokens initial value #32

@krlosMata

Description

@krlosMata

Initial value for feePlanTokens is an empty array initialized with 0 values. This leads to compute accumulated fees for tokenID = 0 even if the fee is not going to be recollected.
In order to NOT accumulate unnecessary fees, feePlanTokens could be initialized with a tokenID values that do not accumulate fees.
tokenID = 2^32 - 1 could be used since this would be a tokenID not used in the rollup unless 2**32 - 1 tokens are added which is not currently feasible.

this.feePlanTokens = Array(this.totalFeeTransactions).fill(2**32 - 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions