Skip to content

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.

@wemeetagain wemeetagain force-pushed the cayman/gs1.1-refactor-maps branch from 97f8ef5 to 61698eb Compare July 21, 2020 16:53
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.

3 participants