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

gs1.1: use string peer id consistently #111

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Jul 20, 2020

Replace many uses of PeerStreams with string peer id as the primary/sole peer identifier

  • internal maps, use string peer id where possible
  • internal methods, use string peer id where possible
  • only use peerStreams when the peerStreams.protocol or peerStreams.write is needed.

In all cases, the variable name id is used to refer to a string peer id.
In a separate PR, we might consider renaming this variable to p to more closely conform to the go-libp2p-pubsub implementation.

Copy link
Collaborator

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM!
This is definitely a good call 👍

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2020

Codecov Report

Merging #111 into gsv1.1 will increase coverage by 0.54%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           gsv1.1     #111      +/-   ##
==========================================
+ Coverage   75.38%   75.93%   +0.54%     
==========================================
  Files          22       22              
  Lines        1361     1342      -19     
==========================================
- Hits         1026     1019       -7     
+ Misses        335      323      -12     
Impacted Files Coverage Δ
src/pubsub.js 82.26% <0.00%> (-0.83%) ⬇️
src/index.js 68.26% <0.00%> (+0.81%) ⬆️
src/heartbeat.js 62.33% <0.00%> (+1.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a792de...61698eb. Read the comment docs.

@wemeetagain wemeetagain merged commit 89bf606 into gsv1.1 Jul 21, 2020
@wemeetagain wemeetagain deleted the cayman/gs1.1-refactor-maps branch July 21, 2020 17:53
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.

None yet

3 participants