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

Add tests for hash sharing #678

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

alanmcgovern
Copy link
Owner

@alanmcgovern alanmcgovern commented Aug 20, 2024

backfills tests for 89874d0

@alanmcgovern alanmcgovern force-pushed the add-tests-for-hash-sharing branch 3 times, most recently from 7a6eee1 to 78696ea Compare August 20, 2024 21:26
Comment on lines +124 to +125
if (Engine.PeerId.Equals (message.PeerId))
return false;
Copy link
Owner Author

Choose a reason for hiding this comment

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

This moves the peer id check earlier, prior to raising the 'PeerConnected' event and adding the peer as an active connection. It's a little cleaner this way :)

This test validates that for both incoming and outgoing connections,
both sides of the handshake correctly treat the connection as upgraded
to v2 after a v1 handshake is sent.

This adds tests covering commit
89874d0. I over-eagerly merged that
prior to adding the test, but i also reverted the change to ensure this
test failed without those changes.
@alanmcgovern alanmcgovern merged commit b2f4c70 into master Aug 20, 2024
0 of 2 checks passed
@alanmcgovern alanmcgovern deleted the add-tests-for-hash-sharing branch August 20, 2024 21:32
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.

1 participant