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

fix(tm2): avoid mutex copy in marshal and unmarshal methods #2981

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

mvertes
Copy link
Contributor

@mvertes mvertes commented Oct 18, 2024

Avoid copying of Mutex at several places.
Add missing lock / unlock calls.
Improve test coverage for protobuf timestamp and duration.

go vet doesn't complain anymore on Mutex copy.

Addresses #2954.

Contributors' checklist...
  • [*] Added new tests, or not needed, or not feasible
  • [*] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [*] Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • [*] Added references to related issues and PRs
  • Provided any useful hints for running manual tests

Avoid copying of Mutex at several places.
Add missing lock / unlock calls.
Improve test coverage for protobuf timestamp and duration.

`go vet` doesn't complain anymore on Mutex copy.

Addresses gnolang#2954.
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Oct 18, 2024
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.

Project coverage is 63.08%. Comparing base (a73cb22) to head (ccbf67a).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
tm2/pkg/bitarray/bit_array.go 60.00% 4 Missing ⚠️
tm2/pkg/amino/wellknown.go 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2981      +/-   ##
==========================================
+ Coverage   61.10%   63.08%   +1.98%     
==========================================
  Files         564      563       -1     
  Lines       75355    79950    +4595     
==========================================
+ Hits        46045    50436    +4391     
- Misses      25945    26131     +186     
- Partials     3365     3383      +18     
Flag Coverage Δ
contribs/gnodev 60.62% <ø> (-0.84%) ⬇️
contribs/gnofaucet 15.77% <ø> (+0.45%) ⬆️
gno.land 67.56% <ø> (-0.37%) ⬇️
gnovm 67.25% <ø> (+1.07%) ⬆️
misc/genstd 79.72% <ø> (-0.83%) ⬇️
misc/logos 19.95% <ø> (-0.28%) ⬇️
tm2 62.31% <72.72%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@gfanton gfanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtml

@thehowl thehowl merged commit a5c1d18 into gnolang:master Oct 21, 2024
122 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants