From 39d1ae9ac8d6b87f6de29ec4940fd10c800e612a Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 16 Mar 2015 12:59:29 -0400 Subject: [PATCH] fix jsdocs for message commands --- lib/messages/commands/filteradd.js | 3 ++- lib/messages/commands/getdata.js | 12 ++++++++++++ lib/messages/commands/notfound.js | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/messages/commands/filteradd.js b/lib/messages/commands/filteradd.js index 9c2728c..c9349df 100644 --- a/lib/messages/commands/filteradd.js +++ b/lib/messages/commands/filteradd.js @@ -13,7 +13,8 @@ var magicNumber = bitcore.Networks.defaultNetwork.networkMagic.readUInt32LE(0); /** * Request peer to add data to a bloom filter already set by 'filterload' - * @param {Buffer} data - Array of bytes representing bloom filter data + * @param {Object} options + * @param {Buffer} options.data - Array of bytes representing bloom filter data * @extends Message * @constructor */ diff --git a/lib/messages/commands/getdata.js b/lib/messages/commands/getdata.js index 1cf947a..9dfeb49 100644 --- a/lib/messages/commands/getdata.js +++ b/lib/messages/commands/getdata.js @@ -40,14 +40,26 @@ function GetdataMessage(options) { } inherits(GetdataMessage, Message); +/** + * @param {Buffer|String} hash - The hash of the transaction inventory item + * @returns {GetdataMessage} + */ GetdataMessage.forTransaction = function(hash) { return new GetdataMessage([Inventory.forTransaction(hash)]); }; +/** + * @param {Buffer|String} hash - The hash of the block inventory item + * @returns {GetdataMessage} + */ GetdataMessage.forBlock = function(hash) { return new GetdataMessage([Inventory.forBlock(hash)]); }; +/** + * @param {Buffer|String} hash - The hash of the filtered block inventory item + * @returns {GetdataMessage} + */ GetdataMessage.forFilteredBlock = function(hash) { return new GetdataMessage([Inventory.forFilteredBlock(hash)]); }; diff --git a/lib/messages/commands/notfound.js b/lib/messages/commands/notfound.js index f7eed04..5b96e16 100644 --- a/lib/messages/commands/notfound.js +++ b/lib/messages/commands/notfound.js @@ -41,7 +41,7 @@ inherits(NotfoundMessage, Message); /** * @param {Buffer|String} hash - The hash of the transaction inventory item - * @returns {InvMessage} + * @returns {NotfoundMessage} */ NotfoundMessage.forTransaction = function(hash) { return new NotfoundMessage([Inventory.forTransaction(hash)]); @@ -49,7 +49,7 @@ NotfoundMessage.forTransaction = function(hash) { /** * @param {Buffer|String} hash - The hash of the block inventory item - * @returns {InvMessage} + * @returns {NotfoundMessage} */ NotfoundMessage.forBlock = function(hash) { return new NotfoundMessage([Inventory.forBlock(hash)]); @@ -57,7 +57,7 @@ NotfoundMessage.forBlock = function(hash) { /** * @param {Buffer|String} hash - The hash of the filtered block inventory item - * @returns {InvMessage} + * @returns {NotfoundMessage} */ NotfoundMessage.forFilteredBlock = function(hash) { return new NotfoundMessage([Inventory.forFilteredBlock(hash)]);