Skip to content

network: fix double counting in numOutgoingPending#6517

Merged
algorandskiy merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/network-ws-fix-numOutgoingPending
Dec 17, 2025
Merged

network: fix double counting in numOutgoingPending#6517
algorandskiy merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/network-ws-fix-numOutgoingPending

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

@algorandskiy algorandskiy commented Dec 16, 2025

Summary

tryConnectAddrs always populates two entries per pending connection: addr and gossipAddr that leads to 2x of pending conns reported by numOutgoingPending() so that meshThreadInner always reports inflated value

Test Plan

Added a test checking even numbers in the map and a proper number of pending conns returned.

tryConnectAddrs always populates two entries per pending connection:
addr and gossipAddr that leads to 2x of pending conns reported by
numOutgoingPending wo that meshThreadInner always reports inflated value
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.69%. Comparing base (6ee2e7c) to head (e81bede).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6517      +/-   ##
==========================================
- Coverage   47.87%   47.69%   -0.19%     
==========================================
  Files         662      655       -7     
  Lines       87934    87849      -85     
==========================================
- Hits        42095    41896     -199     
- Misses      43076    43179     +103     
- Partials     2763     2774      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread network/wsNetwork.go
@algorandskiy algorandskiy merged commit b05c3bf into algorand:master Dec 17, 2025
40 checks passed
@algorandskiy algorandskiy deleted the pavel/network-ws-fix-numOutgoingPending branch March 16, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants