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

Problem: get set params are not align in evm #456

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Apr 5, 2024

Closes: #XXX

Description


For contributor use:

  • 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.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@mmsqe mmsqe requested a review from yihuang April 5, 2024 04:54
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.94%. Comparing base (c684a04) to head (588c374).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #456      +/-   ##
===========================================
+ Coverage    62.92%   62.94%   +0.02%     
===========================================
  Files          127      127              
  Lines        12067    12062       -5     
===========================================
  Hits          7593     7593              
+ Misses        3933     3930       -3     
+ Partials       541      539       -2     
Files Coverage Δ
app/app.go 80.52% <ø> (-0.03%) ⬇️
x/evm/keeper/keeper.go 86.04% <ø> (-0.11%) ⬇️
x/evm/keeper/params.go 89.65% <100.00%> (+14.65%) ⬆️

@@ -30,8 +30,12 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params {
objStore := ctx.ObjectStore(k.objectKey)
v := objStore.Get(types.KeyPrefixObjectParams)
if v == nil {
store := k.storeService.OpenKVStore(ctx)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference here, using store service vs store key?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

return is different, and we need panic if err right?

Copy link
Collaborator

@yihuang yihuang Apr 5, 2024

Choose a reason for hiding this comment

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

the behavior is identical, the old store also panic on invalid input.
But the store service introduce extra memory allocation for the wrapper, I want to remove them.

@mmsqe mmsqe changed the title Problem: get set params are not align in feemarket Problem: get set params are not align in evm Apr 5, 2024
@mmsqe mmsqe enabled auto-merge (squash) April 5, 2024 05:25
@mmsqe mmsqe merged commit 4e8c133 into crypto-org-chain:develop Apr 5, 2024
36 of 38 checks passed
@yihuang yihuang deleted the align_params branch April 5, 2024 05:43
@yihuang yihuang mentioned this pull request Apr 5, 2024
7 tasks
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.

2 participants