Fix restore proto activation
This MR is manifolds:
- improve protocol table consistency checks when starting the node,
- (lots of) refactoring,
- add a test to check that the protocols restoration is done as expected,
- fix and optimise the way the protocols table was restored.
Manually testing the MR
-
dune exec ./src/lib_store/unix/test/test.exe --no-buffer -f -- test "consistency", - Take the data directory of a node, break it (by removing the
store/chain_xxx/protocols_tableor another file), run your node and observe the behaviour.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by vbot