refactor: use maps.Copy to simplify the code#925
Closed
oncecelll wants to merge 3 commits intocosmos:mainfrom
Closed
refactor: use maps.Copy to simplify the code#925oncecelll wants to merge 3 commits intocosmos:mainfrom
oncecelll wants to merge 3 commits intocosmos:mainfrom
Conversation
Signed-off-by: oncecelll <oncecell@outlook.com>
Contributor
|
@mattac21 to take a look at this. should be good - just want to make sure we have tests in place for this |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
mattac21
requested changes
Jan 20, 2026
| for addr, set := range subpool.Pending(filter) { | ||
| txs[addr] = set | ||
| } | ||
| maps.Copy(txs, subpool.Pending(filter)) |
Contributor
There was a problem hiding this comment.
do you mind adding tests for these? should be pretty straightforward, looks like we already have a mocked subpool you can use here. thanks!
Member
|
Hi, closing this PR as it has been 2 weeks with no response. Feel free to reopen with another PR that adds a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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...
mainbranch