-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fill time
field in ExecCommitBlock
#746
Conversation
…mempool + make it debug"
state/execution_test.go
Outdated
@@ -206,10 +206,11 @@ func TestFinalizeBlockValidators(t *testing.T) { | |||
desc string | |||
lastCommitSigs []types.ExtendedCommitSig | |||
expectedAbsentValidators []int | |||
shouldHaveTs bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter's complaining about this field name - is the "Ts" meant to represent "timestamp"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. What do you suggest?
E.g., shall I expand Ts to Timestamp ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, simpler, I'll rename it to shouldHaveTime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter was recommending shouldHaveTS
, but any of those should do.
* Rephrase log when committed TX not in local mempool + make it debug * Add failing UT * Fill time in ExecCommitBlock * Fix UT logic * Revert unrelated commit "Rephrase log when committed TX not in local mempool + make it debug" * Fix lint (cherry picked from commit b8187b0)
* Rephrase log when committed TX not in local mempool + make it debug * Add failing UT * Fill time in ExecCommitBlock * Fix UT logic * Revert unrelated commit "Rephrase log when committed TX not in local mempool + make it debug" * Fix lint (cherry picked from commit b8187b0) Co-authored-by: Sergio Mena <sergio@informal.systems>
Closes #739
Similar to #687,
ExecCommitBlock
is not filling thetime
field. Further, there was no UT catching this.This PR add logic to an existing test case to check for that field. The test case is initially failing. When added the production fix (and fixing the test case logic), the test case passes.
PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments