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

chore: address vanity nits in 08-wasm (code structure, godocs) #5320

Merged
merged 8 commits into from
Dec 6, 2023

Conversation

damiannolan
Copy link
Member

Description

  • Moves MockEngine struct def further up in mock_engine.go file for better readability/clarity
  • Consolidate sdk.Msg codec registration to leverage varargs argument
  • Add godocs to various exported symbols (WasmConfig, Store wrapper)
  • Move store code handling checksums state to store.go, delete ambiguous wasm.go and wasm_test.go files.

I think there are more improvements that could be made to help structure the code and package layout more optimally but we can follow up on them in future.


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
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

lgtm, left some minor qs on docs

modules/light-clients/08-wasm/types/store.go Outdated Show resolved Hide resolved
Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

💅 🙏

@damiannolan damiannolan merged commit cb74fd1 into main Dec 6, 2023
74 checks passed
@damiannolan damiannolan deleted the damian/wasm-nits branch December 6, 2023 00:03
mergify bot pushed a commit that referenced this pull request Dec 6, 2023
* chore: restructure mock_engine.go

* chore: consolidate sdk.Msg codec registration

* chore: adding godoc to WasmConfig

* chore: move state storage code to store.go, rm ambiguous wasm.go and wasm_test.go files

* chore: add more meat to mock engine godoc

* chore: update storeAdapter godoc to use wasmvmtypes.KVStore

* lint: yes

* Update modules/light-clients/08-wasm/testing/mock_engine.go

(cherry picked from commit cb74fd1)

# Conflicts:
#	modules/light-clients/08-wasm/types/store.go
#	modules/light-clients/08-wasm/types/wasm.go
#	modules/light-clients/08-wasm/types/wasm_test.go
mergify bot pushed a commit that referenced this pull request Dec 6, 2023
* chore: restructure mock_engine.go

* chore: consolidate sdk.Msg codec registration

* chore: adding godoc to WasmConfig

* chore: move state storage code to store.go, rm ambiguous wasm.go and wasm_test.go files

* chore: add more meat to mock engine godoc

* chore: update storeAdapter godoc to use wasmvmtypes.KVStore

* lint: yes

* Update modules/light-clients/08-wasm/testing/mock_engine.go

(cherry picked from commit cb74fd1)
damiannolan added a commit that referenced this pull request Dec 6, 2023
#5322)

* chore: restructure mock_engine.go

* chore: consolidate sdk.Msg codec registration

* chore: adding godoc to WasmConfig

* chore: move state storage code to store.go, rm ambiguous wasm.go and wasm_test.go files

* chore: add more meat to mock engine godoc

* chore: update storeAdapter godoc to use wasmvmtypes.KVStore

* lint: yes

* Update modules/light-clients/08-wasm/testing/mock_engine.go

(cherry picked from commit cb74fd1)

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
crodriguezvega pushed a commit that referenced this pull request Dec 6, 2023
…ort #5320) (#5321)

* chore: address vanity nits in 08-wasm (code structure, godocs) (#5320)

* chore: restructure mock_engine.go

* chore: consolidate sdk.Msg codec registration

* chore: adding godoc to WasmConfig

* chore: move state storage code to store.go, rm ambiguous wasm.go and wasm_test.go files

* chore: add more meat to mock engine godoc

* chore: update storeAdapter godoc to use wasmvmtypes.KVStore

* lint: yes

* Update modules/light-clients/08-wasm/testing/mock_engine.go

(cherry picked from commit cb74fd1)

# Conflicts:
#	modules/light-clients/08-wasm/types/store.go
#	modules/light-clients/08-wasm/types/wasm.go
#	modules/light-clients/08-wasm/types/wasm_test.go

* resolve conflicts in backport

---------

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
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.

3 participants