Closed castarco closed 5 years ago
It's good to check this, but wouldn't it be better to make it a unit test instead?
It's good to check this, but wouldn't it be better to make it a unit test instead?
Yes, I could extract the check function from the unit-e binary and just execute it in the unit tests.
It's good to check this, but wouldn't it be better to make it a unit test instead?
Interesting, I just commented exactly the other way.
I think it should be an assert as this is about the consistency of parameters which are consensus critical, the node should not operate with an invalid setting here.
I just reverted the last three commits.
I just applied one of @scravy 's suggestions, although not his preferred one.
utACK 81db412d081754dbb956e99d148cb2df5c3ba123
Given that some consensus parameters (like reward) are in part derived from the chain parameter stating which is the expected initial supply, to ensure consistency, we should assert that the constant is actually correct.
This commit adds such assertion, checking the constant against the initial supply created in the genesis block.
Signed-off-by: Andres Correa Casablanca andres@thirdhash.com