From 3d4b0d9a61c848136c37e2e50636b58079dfef5b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 22 Aug 2016 22:11:23 -0700 Subject: [PATCH] peer: minor. --- lib/bcoin/peer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index d01807d0..11200615 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -1141,11 +1141,6 @@ Peer.prototype._handleGetUTXOs = function _handleGetUTXOs(payload) { var coin; if (self.mempool && payload.mempool) { - if (self.mempool.isSpent(hash, index)) { - hits.push(0); - return next(); - } - coin = self.mempool.getCoin(hash, index); if (coin) { @@ -1153,6 +1148,11 @@ Peer.prototype._handleGetUTXOs = function _handleGetUTXOs(payload) { coins.push(coin); return next(); } + + if (self.mempool.isSpent(hash, index)) { + hits.push(0); + return next(); + } } self.chain.db.getCoin(hash, index, function(err, coin) {