cygnusxi / CurecoinSource

Curecoin 2.0+ Source Code
https://curecoin.net
MIT License
146 stars 57 forks source link

Initial POS validation was failing for POS Min Age #43

Closed Hou5e closed 5 years ago

Hou5e commented 5 years ago

The initial POS validation was failing for POS Min Age being checked to 30 days now that it's 4 days, after the hardfork.

Details: The error "CheckStakeKernelHash() : min age violation" was being thrown in CheckProofOfStake because the nStakeMinAge variable wasn't being updated for the changes after the hardfork.

The fix was to update this number, about where the Testnet would update this number: if ( nBestHeight > (int)HF_BLOCK ) nStakeMinAge = 60 60 24 * 4; // 4 day min stake age hardfork The testnet would have missed this because it was setting the value in a good location.

The Peershares fix (https://github.com/Peershares/Peershares/commit/ad71a3b1890208c9ef8ea005c76ee18fbf0b6065) looks good so far with that addition.

Hou5e commented 5 years ago

The second commit has additional info added and updated to the main repo ReadMe.md file. Hopefully, this will help people with their initial setup and reduce some of the outdated info. Thanks!