Skip to content

Fix the MsgModifyNameRequest endpoint to clean up old index entries #1565

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

Merged
merged 12 commits into from
Jun 5, 2023

Conversation

SpicyLemon
Copy link
Contributor

@SpicyLemon SpicyLemon commented May 31, 2023

Description

The name module's MsgModifyNameRequest can be used to change the owner of a name. However, the old address -> name index entry isn't being deleted.

This PR:

  1. Makes it so that, when a record's address is changing, the old address -> name index entry is deleted.
  2. Adds a step to the migration to find and delete any invalid index entries.
  3. Fixes the name sims to actually end up doing things.

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.
  • 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
  • Review Codecov Report in the comment section below once CI passes

@SpicyLemon SpicyLemon requested a review from a team as a code owner May 31, 2023 00:06
@SpicyLemon SpicyLemon changed the title Dwedul/fix name modify Fix the MsgModifyNameRequest endpoint to clean up old index entries May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #1565 (32b6382) into main (4b724a3) will increase coverage by 0.05%.
The diff coverage is 82.50%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
+ Coverage   62.72%   62.78%   +0.05%     
==========================================
  Files         199      199              
  Lines       26122    26188      +66     
==========================================
+ Hits        16386    16443      +57     
- Misses       8636     8642       +6     
- Partials     1100     1103       +3     
Impacted Files Coverage Δ
x/name/keeper/keeper.go 79.33% <77.27%> (-0.67%) ⬇️
x/name/simulation/operations.go 84.32% <85.71%> (+3.34%) ⬆️
app/upgrades.go 56.64% <100.00%> (+2.56%) ⬆️
x/name/simulation/decoder.go 100.00% <100.00%> (ø)

@SpicyLemon SpicyLemon merged commit a830a8e into main Jun 5, 2023
@SpicyLemon SpicyLemon deleted the dwedul/fix-name-modify branch June 5, 2023 16:03
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