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

fix: fix bugs on aborting x/foundation proposals #687

Merged
merged 4 commits into from
Oct 4, 2022

Conversation

0Tech
Copy link
Collaborator

@0Tech 0Tech commented Sep 29, 2022

Description

This patch will fix the stopping logic in the iteration of the abortOldProposals(), and add the corresponding unit test.
It also fixes the misleading variable names of proposal in the test.

Motivation and context

It didn't update the state of the latest proposals (to aborted), if there are proposals of multiple foundation versions.

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@0Tech 0Tech added the A: bug Something isn't working label Sep 29, 2022
@0Tech 0Tech self-assigned this Sep 29, 2022
@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #687 (5e06b60) into main (47eeccc) will increase coverage by 0.03%.
The diff coverage is 0.00%.

❗ Current head 5e06b60 differs from pull request most recent head afd6097. Consider uploading reports for the commit afd6097 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
+ Coverage   61.01%   61.04%   +0.03%     
==========================================
  Files         873      873              
  Lines       98429    98429              
==========================================
+ Hits        60054    60090      +36     
+ Misses      34787    34740      -47     
- Partials     3588     3599      +11     
Impacted Files Coverage Δ
x/foundation/keeper/proposal.go 65.49% <0.00%> (ø)
x/foundation/foundation.go 74.72% <0.00%> (-1.09%) ⬇️
x/foundation/msgs.go 39.42% <0.00%> (-0.49%) ⬇️
x/token/msgs.go 34.51% <0.00%> (+4.06%) ⬆️
x/collection/msgs.go 43.70% <0.00%> (+5.37%) ⬆️
x/token/validation.go 76.36% <0.00%> (+5.45%) ⬆️

@0Tech 0Tech marked this pull request as ready for review September 29, 2022 03:02
@0Tech 0Tech requested a review from zemyblue October 4, 2022 06:53
@0Tech 0Tech merged commit 551bc1c into Finschia:main Oct 4, 2022
@0Tech 0Tech deleted the foundation_fix branch October 4, 2022 08:24
@zemyblue zemyblue added the C:x/foundation x/foundation module label Oct 24, 2022
@zemyblue zemyblue mentioned this pull request Oct 27, 2022
5 tasks
@zemyblue zemyblue mentioned this pull request Nov 28, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working C:x/foundation x/foundation module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants