You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is our central consensus-function and shouldn't be changed light heartedly.
Cf. #215, we want negative test of as many of the modes of failure of this function. So the function should return error codes, not just a boolean as it does now, in order to increase our confidence that the expected code paths are taken.
Also: The function is a bit long. So we could factor out each check with an appropriately named predicate-function or error-code-returning functions. Then we could get rid of the comments in that function.
The text was updated successfully, but these errors were encountered:
Fix a negative test that verifies that the block validity function fails
if the the `block_mmr_accumulator` value is not set correctly. Prior to
the mutations that invalidate the block, we verify that the block is
valid.
Also: This test only works because we verify the `block_mmr_accumulator`
prior to verifying the block proof, since the block proof is invalidated
by the new block_mmr_accumulator field value (since this modification
changes the block's claim). To address this problem (of not knowing what
you're testing in the negative tests), #293 must be solved sooner rather
than later.
This function is our central consensus-function and shouldn't be changed light heartedly.
Cf. #215, we want negative test of as many of the modes of failure of this function. So the function should return error codes, not just a boolean as it does now, in order to increase our confidence that the expected code paths are taken.
Also: The function is a bit long. So we could factor out each check with an appropriately named predicate-function or error-code-returning functions. Then we could get rid of the comments in that function.
The text was updated successfully, but these errors were encountered: