Skip to content

Conversation

@oncecelll
Copy link

@oncecelll oncecelll commented Jan 9, 2026

Description

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Signed-off-by: oncecelll <oncecell@outlook.com>
@aljo242 aljo242 requested a review from mattac21 January 19, 2026 19:27
@aljo242
Copy link
Contributor

aljo242 commented Jan 19, 2026

@mattac21 to take a look at this. should be good - just want to make sure we have tests in place for this

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.60%. Comparing base (78502b5) to head (15c8e9b).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
mempool/txpool/txpool.go 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #925   +/-   ##
=======================================
  Coverage   65.59%   65.60%           
=======================================
  Files         318      318           
  Lines       22256    22253    -3     
=======================================
- Hits        14599    14598    -1     
+ Misses       6486     6484    -2     
  Partials     1171     1171           
Files with missing lines Coverage Δ
mempool/txpool/txpool.go 47.23% <33.33%> (+0.20%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

for addr, set := range subpool.Pending(filter) {
txs[addr] = set
}
maps.Copy(txs, subpool.Pending(filter))
Copy link
Contributor

Choose a reason for hiding this comment

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

do you mind adding tests for these? should be pretty straightforward, looks like we already have a mocked subpool you can use here. thanks!

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