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(bitswap): simplify SessionInterestManager #821

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

guillaumemichel
Copy link
Contributor

Follow up to #752

After investigating around 6cd1ed9, I found that SessionInterestManager keeping track of Interested session, doesn't have a single use case, as @Wondertan suggested.

SessionInterestManager is recording a session's wants (blocks that we want, and that we didn't get yet), as well as interests (block that we want, and we have already). SessionsInterestManager isn't doing anything about the interests, hence I removed interests tracking altogether.

cc: @gammazero

Copy link
Contributor

@gammazero gammazero left a comment

Choose a reason for hiding this comment

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

Thanky for following up in this. Couple of comments to fix, now that there is no distinction between wants and interests.

Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.46%. Comparing base (5c158ec) to head (89f11ca).
Report is 1 commits behind head on main.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #821   +/-   ##
=======================================
  Coverage   60.46%   60.46%           
=======================================
  Files         244      244           
  Lines       31100    31081   -19     
=======================================
- Hits        18805    18794   -11     
+ Misses      10617    10607   -10     
- Partials     1678     1680    +2     
Files with missing lines Coverage Δ
...l/sessioninterestmanager/sessioninterestmanager.go 100.00% <100.00%> (ø)
...p/client/internal/sessionmanager/sessionmanager.go 95.78% <100.00%> (ø)

... and 8 files with indirect coverage changes

@guillaumemichel guillaumemichel merged commit d678ff8 into main Jan 31, 2025
15 checks passed
@guillaumemichel guillaumemichel deleted the fix/sessioninterestmanager branch January 31, 2025 16:20
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