lib/messages/commands/headers.js
function HeadersMessage(arg, options) {
  Message.call(this, options);
  this.BlockHeader = options.BlockHeader;
  this.command = 'headers';
  $.checkArgument(
    _.isUndefined(arg) || (Array.isArray(arg) && arg[0] instanceof this.BlockHeader),
    'First argument is expected to be an array of BlockHeader instances'
  );
  this.headers = arg;
}
function HeadersMessage(arg, options) {
  Message.call(this, options);
  this.BlockHeader = options.BlockHeader;
  this.command = 'headers';
  $.checkArgument(
    _.isUndefined(arg) || (Array.isArray(arg) && arg[0] instanceof this.BlockHeader),
    'First argument is expected to be an array of BlockHeader instances'
  );
  this.headers = arg;
}
function HeadersMessage ( arg , options ) { Message . call ( this , options ) ; this . BlockHeader = options . BlockHeader ; this . command = 'headers' ; $ . checkArgument ( _ . isUndefined ( arg ) || ( Array . isArray ( arg ) && arg [ 0 ] instanceof this . BlockHeader ) , 'First argument is expected to be an array of BlockHeader instances' ) ; this . headers = arg ; }
Sent in response to a `getheaders` message. It contains information about
block headers.
@param {Array} arg - An array of BlockHeader instances
@param {Object=} options
@param {Array=} options.headers - array of block headers
@param {Function} options.BlockHeader - a BlockHeader constructor
@extends Message
@constructor
Sent in response to a getheaders message . It contains information about block headers .