Scoru,Proto: turn invalid deadcode into an error
Context
Closes #3627 (closed)
In sum:
The code can return a None
input when it's a Level_crossing
proof and the upper_level
has no input at index zero
, which does not make sense.
For the [upper_level] to exist in the inbox (and thus in the protocol inbox), it must contain at least one message. That is, you must find a message at index zero
.
The inclusion of the proof.upper_level
is checked before. So, if we reach the code that I modify, upper_level
is properly included in the inbox's snapshot. And again, if the upper_level
is included in the snapshot, it exists and contain at least one message.
Manually testing the MR
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.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Valentin Chaboche