refactor(node): simplify 'node is blocking chain' logic#3885
refactor(node): simplify 'node is blocking chain' logic#3885sergio-mena merged 21 commits intomainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
node/setup.go
Outdated
| config.Mempool, | ||
| mp, | ||
| waitSync, | ||
| true, |
There was a problem hiding this comment.
I assume this is always true because block sync is mandatory?
There was a problem hiding this comment.
Yes. I just (mindlessly) went from the value we would get in the old code if blocksync is set to true, and then simplified
There was a problem hiding this comment.
Actually it was so mindless that it was wrong 🤦.
Luckily, a couple of unit tests failed, which allowed me to spot the problem and validate the fix.
|
There is a test error that might be related to the changes: |
|
Unit tests really saved me here (rather than the usual e2e) |
Contributes to #3415
This is mainly refactoring to simplify
onlyValidatorIsUsandlocalNodeBlocksTheChain(since the latter implies the former).It is a follow-up of #3406 (this is the part of #3406 that doesn't need to be backported)
PR checklist
[ ] Tests written/updated[ ] Changelog entry added in.changelog(we use unclog to manage our changelog)[ ] Updated relevant documentation (docs/orspec/) and code comments