dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Delete old finalization states from disk #1121

Closed frolosofsky closed 5 years ago

frolosofsky commented 5 years ago

We've noticed that finalization state storage aggressively consumes disk space that leads to the out-of-disk condition. This commit fixes that by deleting old states from disk the same way as we trim repository in memory.

Besides that:

castarco commented 5 years ago

What was the problem with Rand?

frolosofsky commented 5 years ago

What was the problem with Rand?

Rand<bool>() always returned false as underlying calling GetRand(1) returns 0, because its argument is exclusive upper bound for random number.