Skip to content

Commit

Permalink
address: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Dec 13, 2018
1 parent 6b54959 commit bcd24d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ version: 2.0
jobs:
install:
<<: *defaults
docker:
- image: circleci/node:10.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
Expand Down
4 changes: 2 additions & 2 deletions lib/indexer/addrindexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class AddrIndexer extends Indexer {
const coins = [];

for (const addr of addrs) {
const hash = Address.getHash(addr, this.network);
const hash = Address.getHash(addr);

const keys = await this.db.keys({
gte: layout.C.min(hash),
Expand Down Expand Up @@ -178,7 +178,7 @@ class AddrIndexer extends Indexer {
const set = new BufferSet();

for (const addr of addrs) {
const hash = Address.getHash(addr, this.network);
const hash = Address.getHash(addr);

await this.db.keys({
gte: layout.T.min(hash),
Expand Down
4 changes: 2 additions & 2 deletions lib/mempool/mempool.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class Mempool extends EventEmitter {
const out = [];

for (const addr of addrs) {
const hash = Address.getHash(addr, this.network);
const hash = Address.getHash(addr);
const txs = this.txIndex.get(hash);

for (const tx of txs)
Expand All @@ -605,7 +605,7 @@ class Mempool extends EventEmitter {
const out = [];

for (const addr of addrs) {
const hash = Address.getHash(addr, this.network);
const hash = Address.getHash(addr);
const txs = this.txIndex.getMeta(hash);

for (const tx of txs)
Expand Down
6 changes: 2 additions & 4 deletions lib/primitives/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,11 @@ class Address {

/**
* Get the hash of a base58 address or address-related object.
* @param {String|Address|Hash} data
* @param {String?} enc
* @param {Network?} network
* @param {Address|Hash} data
* @returns {Hash}
*/

static getHash(data, network) {
static getHash(data) {
if (!data)
throw new Error('Object is not an address.');

Expand Down

0 comments on commit bcd24d1

Please sign in to comment.