wallet: log and rpc fixes.

This commit is contained in:
Christopher Jeffrey 2016-08-25 02:35:39 -07:00
parent d663eef37e
commit ec8e3e0359
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 7 additions and 3 deletions

View File

@ -3655,10 +3655,14 @@ RPC.prototype.listunspent = function listunspent(args, callback) {
? self.chain.height - coin.height + 1
: 0;
if (!(depth > minDepth && depth < maxDepth))
if (!(depth >= minDepth && depth <= maxDepth))
return next();
address = coin.getAddress();
if (!address)
return next();
hash = coin.getHash('hex');
if (addresses) {
@ -4092,7 +4096,7 @@ function toBool(obj, def) {
}
function toNumber(obj, def) {
if (!utils.isNumber(obj))
if (utils.isNumber(obj))
return obj;
return def != null ? def : -1;
}

View File

@ -1533,7 +1533,7 @@ WalletDB.prototype.addTX = function addTX(tx, callback, force) {
if (!wallet)
return next();
self.logger.debug('Adding tx to wallet: %s', info.wid);
self.logger.debug('Adding tx to wallet: %s', info.id);
info.id = wallet.id;