Skip to content

Conversation

@jaramyweb3
Copy link
Contributor

Two functions in x/staking/keeper/delegation.go were missing defer iterator.Close():

  • IterateDelegatorRedelegations
  • GetRedelegations

This causes resource leaks since iterators hold references to underlying storage.

All other 25+ iterator usages in the same file properly call defer iterator.Close() — these two were simply overlooked.

@aljo242
Copy link
Contributor

aljo242 commented Dec 8, 2025

could you please add a changelog entry for this?

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.43%. Comparing base (18e85de) to head (2ce972f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
x/staking/keeper/delegation.go 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #25649      +/-   ##
==========================================
+ Coverage   70.40%   70.43%   +0.03%     
==========================================
  Files         830      830              
  Lines       54050    54052       +2     
==========================================
+ Hits        38052    38071      +19     
+ Misses      15998    15981      -17     
Files with missing lines Coverage Δ
x/staking/keeper/delegation.go 75.03% <50.00%> (-0.07%) ⬇️

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jaramyweb3
Copy link
Contributor Author

sure, thanks

@aljo242 aljo242 enabled auto-merge December 8, 2025 18:41
@aljo242 aljo242 added this pull request to the merge queue Dec 8, 2025
Merged via the queue into cosmos:main with commit 7e9ad4f Dec 8, 2025
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants