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

code hygiene: using host functions instead of constructing manually #3219

Merged
merged 7 commits into from
Mar 9, 2023

Conversation

crodriguezvega
Copy link
Contributor

Description

closes: #XXXX

Commit Message / Changelog Entry

N/A

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@damiannolan
Copy link
Member

Looks like some tests are failing

Comment on lines 392 to 391
clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, clientID))
clientPrefix := host.PrefixedClientStoreKey([]byte(clientID))
Copy link
Member

Choose a reason for hiding this comment

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

seems like these are not quite the same, there's a trailing slash here but not in host.PrefixedClientStoreKey()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhh, yeah! I will revert then, but I wonder then why that trailing slash is needed there.. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I'm not 100% as I didn't look super deep into it. I tried adding the trailing slash to PrefixedClientStorePath but had failing tests elsewhere.

@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2023

Codecov Report

Merging #3219 (396621e) into main (62e09ed) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3219   +/-   ##
=======================================
  Coverage   78.54%   78.54%           
=======================================
  Files         181      181           
  Lines       12580    12580           
=======================================
  Hits         9881     9881           
  Misses       2262     2262           
  Partials      437      437           
Impacted Files Coverage Δ
modules/core/02-client/migrations/v7/store.go 68.85% <100.00%> (ø)
modules/core/02-client/simulation/decoder.go 100.00% <100.00%> (ø)
...dules/light-clients/06-solomachine/client_state.go 88.28% <100.00%> (ø)

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

ACK, I think we can remove the backport label since this is code-hygiene?

@crodriguezvega crodriguezvega merged commit 18fce6a into main Mar 9, 2023
@crodriguezvega crodriguezvega deleted the carlos/nits-host-functions branch March 9, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants