Update peer.js
Added documentation for relay transaction flag.
This commit is contained in:
parent
9bb998dc19
commit
0a6f05a067
@ -19,6 +19,8 @@ var Peer = module.exports = function(options){
|
|||||||
var emptyNetAddress = new Buffer('010000000000000000000000000000000000ffff000000000000', 'hex');
|
var emptyNetAddress = new Buffer('010000000000000000000000000000000000ffff000000000000', 'hex');
|
||||||
var userAgent = util.varStringBuffer('/node-stratum/');
|
var userAgent = util.varStringBuffer('/node-stratum/');
|
||||||
var blockStartHeight = new Buffer('00000000', 'hex'); //block start_height, can be empty
|
var blockStartHeight = new Buffer('00000000', 'hex'); //block start_height, can be empty
|
||||||
|
//If protocol version is new enough, add do not relay transactions flag byte, outlined in BIP37
|
||||||
|
//https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki#extensions-to-existing-messages
|
||||||
var relayTransactions = options.protocolVersion >= 70001 ? new Buffer([false]) : new Buffer([]);
|
var relayTransactions = options.protocolVersion >= 70001 ? new Buffer([false]) : new Buffer([]);
|
||||||
|
|
||||||
//Command strings found at: https://en.bitcoin.it/wiki/Protocol_specification
|
//Command strings found at: https://en.bitcoin.it/wiki/Protocol_specification
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user