agreement: add omitempty to MessageHandle in agreement message #5593
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
As listed in comments and in the issue below we want to remove no longer necessary field from the struct. We will still need another PR and another consensus release before it's safe to delete but we need to add
omitempty
first directive to the field only which this PR does. Not includingomitempty
was an overlook on the original PR was an overlook and I didn't know that the directive could be applied to a single field. Only noticed it recently while working on other unmarshalling msgp code.Once the consensus release is out we can actually delete the field and the associated tests as it will be guaranteed that no nodes running agreement will have this field encoded in their crashDB.
Test Plan
In addition to modifying the existing test below, also ran across 364 rows obtained from a testnet node instrumented to not overwrite the data row and instead append to it. It successfully decoded all of the rows and re-encoded them without including references to MessageHandle. For more details about the test including a screenshot see the original PR at #4644