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

Refactor network configuration for messages #65

Merged
merged 3 commits into from
Apr 24, 2015

Conversation

maraoz
Copy link
Contributor

@maraoz maraoz commented Apr 20, 2015

This PR makes it easier to use bitcore-p2p with custom networks (such as testnet, or others)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c3ead97 on maraoz:refactor/network into 8313c4d on bitpay:master.

* @constructor
*/
function Message(options) {
this.command = options.command;
this.magicNumber = options.magicNumber;
this.network = options.network || Networks.defaultNetwork;
Copy link
Contributor

Choose a reason for hiding this comment

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

The default should always be set in Messages factory, I don't think it needs to be set here if it's not defined.

@braydonf
Copy link
Contributor

Tested. Should make things more clear.

@@ -36,10 +36,10 @@ For advanced usage, you can also customize which constructor is used for Block a
var messages = new Messages({Block: MyBlock, Transaction: MyTransaction});
```

And additionally custom network magic:
And additionally custom network:
Copy link
Contributor

Choose a reason for hiding this comment

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

Existing typo: "And additionally a custom network:"

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ed0bcc9 on maraoz:refactor/network into 8313c4d on bitpay:master.

braydonf pushed a commit that referenced this pull request Apr 24, 2015
Refactor network configuration for messages
@braydonf braydonf merged commit 9799edf into bitpay:master Apr 24, 2015
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