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

refactor: remove useless code and fix a test #3159

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

aeddi
Copy link
Contributor

@aeddi aeddi commented Nov 19, 2024

  • Commit 4b6219c move ValidateBlock method from blockExec to state since blockExec.db was an unused parameter. (simplify + remove misleading comment)
  • Commit 4f02bcd just removes useless Sprintf found in this package
  • Commit c34bfd5 improves ValidateBasic method (adding one more validation test that was marked with a TODO comment)
  • Commit df75b32 removes useless case testing the size of a fixed-sized array, see:
    const (
    // AddressSize is the size of a pubkey address.
    AddressSize = tmhash.TruncatedSize
    )
    // (truncated) hash of some preimage (typically of a pubkey).
    type Address [AddressSize]byte
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

@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.

Project coverage is 63.80%. Comparing base (7188b1c) to head (e5d9431).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
tm2/pkg/bft/consensus/state.go 14.28% 4 Missing and 2 partials ⚠️
tm2/pkg/bft/types/block.go 60.00% 1 Missing and 1 partial ⚠️
tm2/pkg/bft/consensus/replay.go 0.00% 1 Missing ⚠️
tm2/pkg/bft/state/execution.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3159      +/-   ##
==========================================
+ Coverage   63.79%   63.80%   +0.01%     
==========================================
  Files         549      549              
  Lines       78833    78824       -9     
==========================================
+ Hits        50288    50297       +9     
+ Misses      25153    25138      -15     
+ Partials     3392     3389       -3     
Flag Coverage Δ
contribs/gnodev 61.16% <ø> (ø)
contribs/gnofaucet 15.77% <ø> (+0.94%) ⬆️
gno.land 73.70% <ø> (ø)
gnovm 67.94% <ø> (ø)
misc/genstd 79.72% <ø> (ø)
tm2 62.44% <41.17%> (+0.03%) ⬆️

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.


🚨 Try these New Features:

@aeddi aeddi marked this pull request as draft November 19, 2024 15:04
@aeddi aeddi changed the title cleanup: remove useless code and small refacto refactor: remove useless code and small refacto Nov 19, 2024
@aeddi aeddi marked this pull request as ready for review November 20, 2024 01:29
@aeddi aeddi changed the title refactor: remove useless code and small refacto refactor: remove useless code and fix a test Nov 20, 2024
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

@aeddi aeddi merged commit 732bb0b into gnolang:master Nov 20, 2024
138 of 140 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
Development

Successfully merging this pull request may close these issues.

2 participants