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

Check for fee distribution when total number of tokens is changed #448

merged 2 commits into from Jan 3, 2017


Copy link

zathras-crypto commented Jan 3, 2017

This PR requests that the fee cache amount be evaluated against the distribution threshold when there has been a change in the number of tokens.

Currently it is considered that the only path during which the amount of fees cached for a property would cross the distribution threshold would be when the amount in the cache is being increased. As such the evaluation of the amount of fees against the distribution threshold only occurs during AddFee().

However given the distribution threshold is a function of the total number of tokens and OMNI_FEE_THRESHOLD then there is a scenario whereby a revoke on a managed property reduces the total number of tokens and thus in turn reduces the distribution threshold. In this case the amount of fees cached may now be sufficient to trigger a distribution.

There is thus a path outside of AddFee() where distribution should occur & this PR allows for that.

I believe this scenario is unlikely but felt I should still attempt to cover it.



This comment has been minimized.

Copy link

dexX7 commented Jan 3, 2017

Looks good to me.

@dexX7 dexX7 added this to the Next release milestone Jan 3, 2017
@dexX7 dexX7 added the status: ready label Jan 3, 2017
@dexX7 dexX7 merged commit 7b644b7 into OmniLayer:develop Jan 3, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
dexX7 added a commit that referenced this pull request Jan 3, 2017
… changed

7b644b7 Test for fee distribution when number of tokens (and thus threshold) changes (Zathras)
0206be1 Pass block into NotifyTotalTokensChanged() (Zathras)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.