threshold-network / merkle-distribution

Threshold Network rewards generation and distribution
https://threshold.network
1 stars 6 forks source link

Improve test of Cumulative distribution #16

Closed theref closed 1 year ago

theref commented 2 years ago

If the beneficiary for a stakeholder changes between the first second distribution, within the test you need to calculate the difference between amount from cumDist and dist, which means tracking the first distribution.

The test should be able to handle much more robust and complicated examples.

manumonti commented 2 years ago

Example about test fails when second distribution is larger: https://github.com/theref/merkle-distribution/pull/4