rpc: fix listunspent.

This commit is contained in:
Christopher Jeffrey 2016-08-11 02:56:16 -07:00
parent 3265e80c8e
commit e910147544
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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');