Skip to content

Conversation

@algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Jul 29, 2024

Summary

There was a possible race condition between starting a new wsPeer (that starts reading/writing goroutines), and registering this peer in wsPeers map. wsNetwork.addPeer had such check but p2pNetwork.wsStreamHandler missed it. See failed test logs for demo.

Additionally fixed asserts in catchup tests - on an error they were logging incorrect error object.

Test Plan

Discovered by a test added in #6082

@algorandskiy algorandskiy added Bug-Fix p2p Work related to the p2p project labels Jul 29, 2024
@algorandskiy algorandskiy self-assigned this Jul 29, 2024
@codecov
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 56.26%. Comparing base (edda2ee) to head (d7ce2bf).

Files Patch % Lines
network/p2pNetwork.go 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6086      +/-   ##
==========================================
+ Coverage   55.95%   56.26%   +0.31%     
==========================================
  Files         488      488              
  Lines       69602    69606       +4     
==========================================
+ Hits        38945    39164     +219     
+ Misses      27967    27787     -180     
+ Partials     2690     2655      -35     

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

Co-authored-by: cce <51567+cce@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug-Fix p2p Work related to the p2p project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants