-
Notifications
You must be signed in to change notification settings - Fork 276
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
Conversation
* @constructor | ||
*/ | ||
function Message(options) { | ||
this.command = options.command; | ||
this.magicNumber = options.magicNumber; | ||
this.network = options.network || Networks.defaultNetwork; |
There was a problem hiding this comment.
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.
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: |
There was a problem hiding this comment.
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:"
Refactor network configuration for messages
This PR makes it easier to use bitcore-p2p with custom networks (such as testnet, or others)