From e91014754436146ee4626fea59583d5eb865efb6 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 11 Aug 2016 02:56:16 -0700 Subject: [PATCH] rpc: fix listunspent. --- lib/bcoin/http/rpc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/http/rpc.js b/lib/bcoin/http/rpc.js index fc9eff31..ceab1a21 100644 --- a/lib/bcoin/http/rpc.js +++ b/lib/bcoin/http/rpc.js @@ -3365,7 +3365,8 @@ RPC.prototype.listunspent = function listunspent(args, callback) { var minDepth = 1; var maxDepth = 9999999; var out = []; - var i, addresses, map, coin, depth, address, hash, ring; + var map = {}; + var i, addresses, coin, depth, address, hash, ring; if (args.help || args.length > 3) { return callback(new RPCError('listunspent' @@ -3383,7 +3384,6 @@ RPC.prototype.listunspent = function listunspent(args, callback) { if (Array.isArray(args[2])) { addresses = true; - map = {}; utils.forEachSerial(args[2], function(address, next) { hash = bcoin.address.getHash(String(address), 'hex');