dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

feat: skip governance checks for blocks below the best chainlock #6036

Closed UdjinM6 closed 4 weeks ago

UdjinM6 commented 1 month ago

Issue being fixed or feature implemented

A node can miss governance trigger sometimes and then it would stuck not being able to sync any further. This issue can be fixed manually by resetting sync status and reconsidering the "invalid" block. However, that's inconvenient. Also, what it does under the hood is it simply disables some parts of block validation. We could do that automagically and more precise if we would trust ChainLocks instead.

What was done?

Skip governance checks for blocks below the best known chainlock, add tests.

How Has This Been Tested?

Run tests.

Breaking Changes

n/a

Checklist:

knst commented 4 weeks ago

ping @PastaPastaPasta ?