[MEL] - Prevent MEL node startup if have non-MEL entries in ConsensusDB#4449
[MEL] - Prevent MEL node startup if have non-MEL entries in ConsensusDB#4449rauljordan merged 7 commits intomasterfrom
Conversation
bragaigor
left a comment
There was a problem hiding this comment.
LGTM, just a few minor comments
❌ 11 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4449 +/- ##
==========================================
+ Coverage 34.54% 35.12% +0.58%
==========================================
Files 497 497
Lines 58907 58934 +27
==========================================
+ Hits 20347 20701 +354
+ Misses 34965 34550 -415
- Partials 3595 3683 +88 |
eljobe
left a comment
There was a problem hiding this comment.
Would it be prohibitively expensive to write some unit tests for this?
I think it would be great to be sure we have the right branches covered.
arbnode/node.go
Outdated
| return err | ||
| } | ||
| if hasDelayedMessageCountKey { | ||
| return errors.New("MEL being initialized when DB already has stale keys from inbox reader") |
There was a problem hiding this comment.
It would be better if this error were distinguishable from the one on line 836 when we see them in a log. Like, it would be good to mention that this one found a stale DelayedMessageCountKey and the other one found a SequencerBatchCountKey.
There was a problem hiding this comment.
added the tests
The base branch was changed.
This PR makes it that If the inbox tracker / reader have DB values (meaning a node was started in non-MEL mode), we should error on startup if we enable the MEL flag.
Resolves NIT-4571