Skip to content

Commit

Permalink
Update JSDoc comments to add missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Sep 26, 2018
1 parent 8a9e76e commit 38077a1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
15 changes: 9 additions & 6 deletions lib/bloom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const byteSize = 256
* drops leading zeroes from a buffer
* @function dropLeadingZeroes
* @param {Buffer} buff
* @returns {Buffer} a slice of the buffer starting at the first non-zero entry
*/
function dropLeadingZeroes (buff) {
for (var i = 0; i < buff.length; i++) {
Expand All @@ -32,7 +33,7 @@ var Bloom = module.exports = function (bitvector) {
/**
* adds an element to a bit vector of a 64 byte bloom filter
* @method add
* @param {Buffer} element
* @param e - the element
*/
Bloom.prototype.add = function (e) {
e = utils.keccak256(dropLeadingZeroes(e))
Expand All @@ -48,9 +49,10 @@ Bloom.prototype.add = function (e) {
}

/**
* checks if an element is in the blooom
* checks if an element is in the bloom
* @method check
* @param {Buffer} element
* @param e - the element
* @returns {boolean} Returns {@code true} if the element is in the bloom
*/
Bloom.prototype.check = function (e) {
e = utils.keccak256(dropLeadingZeroes(e))
Expand All @@ -69,9 +71,10 @@ Bloom.prototype.check = function (e) {
}

/**
* checks if multple topics are in a bloom
* @method check
* @param {Buffer} element
* checks if multiple topics are in a bloom
* @method multiCheck
* @param {Buffer} topics
* @returns {boolean} Returns {@code true}
*/
Bloom.prototype.multiCheck = function (topics) {
var self = this
Expand Down
3 changes: 3 additions & 0 deletions lib/opFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ function trap (err) {
/**
* Subtracts the amount needed for memory usage from `runState.gasLeft`
* @method subMemUsage
* @param runState
* @param {BN} offset
* @param {BN} length
* @return {String}
Expand Down Expand Up @@ -829,6 +830,7 @@ function subMemUsage (runState, offset, length) {
* a string is instead returned. The function also subtracts the amount of
* gas need for memory expansion.
* @method memLoad
* @param runState
* @param {BN} offset where to start reading from
* @param {BN} length how far to read
* @return {Buffer|String}
Expand Down Expand Up @@ -858,6 +860,7 @@ function memLoad (runState, offset, length) {
* Stores bytes to memory. If an error occurs a string is instead returned.
* The function also subtracts the amount of gas need for memory expansion.
* @method memStore
* @param runState
* @param {BN} offset where to start reading from
* @param {Buffer} val
* @param {BN} valOffset
Expand Down
1 change: 1 addition & 0 deletions lib/runBlockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const async = require('async')
* processes blocks and adds them to the blockchain
* @method onBlock
* @param blockchain
* @param {Function} cb the callback
*/
module.exports = function (blockchain, cb) {
var self = this
Expand Down
1 change: 1 addition & 0 deletions lib/runCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const ERROR = exceptions.ERROR
* runs a CALL operation
* @method runCall
* @param opts
* @param cb the callback
* @param opts.block {Block}
* @param opts.caller {Buffer}
* @param opts.code {Buffer} this is for CALLCODE where the code to load is different than the code from the to account.
Expand Down
4 changes: 2 additions & 2 deletions lib/stateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ proto.getStateRoot = function (cb) {
}

/**
* @param {Set} address
* @param {cb} function
* @param {Set} addresses a set of addresses
* @param {Function} cb the callback
*/
proto.warmCache = function (addresses, cb) {
this.cache.warm(addresses, cb)
Expand Down

0 comments on commit 38077a1

Please sign in to comment.