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

Improve feePlanTokens initial value #32

Open
krlosMata opened this issue Jul 6, 2021 · 0 comments
Open

Improve feePlanTokens initial value #32

krlosMata opened this issue Jul 6, 2021 · 0 comments
Labels
new feature new feature

Comments

@krlosMata
Copy link
Contributor

krlosMata commented Jul 6, 2021

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new feature new feature
Projects
None yet
Development

No branches or pull requests

1 participant