diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index c952bcd5..932936fe 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -41,8 +41,8 @@ function Mempool(node, options) { this.totalOrphans = 0; this.coins = {}; this.txs = {}; - this.psIndex = new BinaryIndex; - this.addressMap = new AddressMap; + this.psIndex = new BinaryIndex(); + this.addressMap = new AddressMap(); this.orphans = {}; this.waiting = {}; this.spent = {}; @@ -1378,9 +1378,7 @@ BinaryIndex.prototype.insert = function insert(tx) { BinaryIndex.prototype.remove = function remove(tx) { var hash = tx.hash(); - var index; - - index = binarySearch(this.data, hash); + var index = binarySearch(this.data, hash); if (index !== -1) { this.index.splice(index, 1);