Skip to content

Commit

Permalink
Use const instead of txType method
Browse files Browse the repository at this point in the history
The method just wrapped a single const.
  • Loading branch information
dagurval committed Feb 21, 2019
1 parent dcf21d1 commit 7d34413
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/net/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ class Peer extends EventEmitter {

/**
* Calculate peer block inv type (filtered,
* compact, witness, or non-witness).
* compact or full block)
* @returns {Number}
*/

Expand All @@ -1243,15 +1243,6 @@ class Peer extends EventEmitter {
return invTypes.BLOCK;
}

/**
* Calculate peer tx inv type (witness or non-witness).
* @returns {Number}
*/

txType() {
return invTypes.TX;
}

/**
* Send `getdata` to peer.
* @param {InvItem[]} items
Expand Down Expand Up @@ -1294,7 +1285,7 @@ class Peer extends EventEmitter {
*/

getTX(hashes) {
this.getItems(this.txType(), hashes);
this.getItems(invTypes.TX, hashes);
}

/**
Expand Down

0 comments on commit 7d34413

Please sign in to comment.