Skip to content
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

Merged
merged 7 commits into from
Apr 24, 2023

Conversation

sergio-mena
Copy link
Contributor

Closes #739

Similar to #687, ExecCommitBlock is not filling the time 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

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

@sergio-mena sergio-mena added the bug Something isn't working label Apr 24, 2023
@sergio-mena sergio-mena requested a review from a team as a code owner April 24, 2023 09:57
@sergio-mena sergio-mena self-assigned this Apr 24, 2023
@@ -206,10 +206,11 @@ func TestFinalizeBlockValidators(t *testing.T) {
desc string
lastCommitSigs []types.ExtendedCommitSig
expectedAbsentValidators []int
shouldHaveTs bool
Copy link
Contributor

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"?

Copy link
Contributor Author

@sergio-mena sergio-mena Apr 24, 2023

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 ?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@sergio-mena sergio-mena added the backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x label Apr 24, 2023
@sergio-mena sergio-mena merged commit b8187b0 into main Apr 24, 2023
@sergio-mena sergio-mena deleted the sergio/739-time-in-exec-commit-block branch April 24, 2023 17:17
mergify bot pushed a commit that referenced this pull request Apr 24, 2023
* 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)
sergio-mena added a commit that referenced this pull request Apr 25, 2023
* 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>
thanethomson pushed a commit that referenced this pull request May 6, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ExecCommitBlock does not fill the time field in FinalizeBlock
3 participants