Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Published message field names #49

Merged
merged 2 commits into from
Nov 16, 2017
Merged

Published message field names #49

merged 2 commits into from
Nov 16, 2017

Conversation

richardschneider
Copy link
Contributor

JS implementation has renamed the field topicIDs to topicCIDs, see the Message spec. This is not a good idea. See background discussion

@ghost ghost added the status/in-progress In progress label Nov 14, 2017
@@ -131,7 +131,7 @@ describe('basics between 2 nodes', () => {
expect(msg.data.toString()).to.equal('banana')
expect(msg.from).to.be.eql(fsB.libp2p.peerInfo.id.toB58String())
expect(Buffer.isBuffer(msg.seqno)).to.be.true()
expect(msg.topicCIDs).to.be.eql(['Z'])
expect(msg.topicIDs).to.be.eql(['Z'])
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

right! Sorry, missed that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@richardschneider
Copy link
Contributor Author

LGTM

@daviddias daviddias merged commit b8f66cd into master Nov 16, 2017
@daviddias daviddias deleted the pubsub-message branch November 16, 2017 09:54
@ghost ghost removed the status/in-progress In progress label Nov 16, 2017
richardschneider added a commit that referenced this pull request Nov 19, 2017
daviddias pushed a commit that referenced this pull request Nov 22, 2017
* fix: startup

* Revert "fix: Published message field names (#49)"

This reverts commit b8f66cd.

* fix: close should always invoke callback

* fix: avoid race conditions, by quietly ignoring unsub when shutdown

* fix: only delete peer when connections match

* fix: lint errors

* fix: more work on connection shutdown

* fix: RPC msg.from is now binary

* fix: lint errors

* fix: multiple connections to/from same peer

This implements a refernce counting scheme.  See #51 (comment)

One test is still failing.

* fix: topicCIDs => topicIDs

* test: can not get this test to work!

* fix: lint errors

* fix: review changes

* fix: lint errors on a comment, this going too far

* test: get test working

* test: add tests for publishing an array of messages

* subscribe: polling for connectivity replaced by handling peer connection event

* fix typo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants