Update version
This commit is contained in:
parent
333fb4f787
commit
74b7571517
@ -9,7 +9,7 @@ The bitcoin protocol specifies a set of [messages](https://en.bitcoin.it/wiki/Pr
|
||||
|
||||
### Version
|
||||
|
||||
The version message (`ver`) is used on connection creation, to advertise the type of node. The remote node will respond with its version, and no communication is possible until both peers have exchanged their versions. By default, bitcore advertises itself as named `bitcore:0.8`.
|
||||
The version message (`ver`) is used on connection creation, to advertise the type of node. The remote node will respond with its version, and no communication is possible until both peers have exchanged their versions. By default, bitcore advertises itself as named `bitcore` with the current version of the `bitcore-p2p` package.
|
||||
|
||||
### VerAck
|
||||
|
||||
|
||||
@ -172,9 +172,10 @@ module.exports.Message = Message;
|
||||
* @param{Buffer} nonce - a random 8 bytes buffer
|
||||
*/
|
||||
function Version(subversion, nonce) {
|
||||
var packageInfo = require('../package.json');
|
||||
this.command = 'version';
|
||||
this.version = PROTOCOL_VERSION;
|
||||
this.subversion = subversion || '/bitcore:0.8/';
|
||||
this.subversion = subversion || '/bitcore:' + packageInfo.version + '/';
|
||||
this.nonce = nonce || CONNECTION_NONCE;
|
||||
}
|
||||
util.inherits(Version, Message);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user