Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature new feature
Projects
None yet
Development

No branches or pull requests

1 participant