wallet: log and rpc fixes.
This commit is contained in:
parent
d663eef37e
commit
ec8e3e0359
@ -3655,10 +3655,14 @@ RPC.prototype.listunspent = function listunspent(args, callback) {
|
|||||||
? self.chain.height - coin.height + 1
|
? self.chain.height - coin.height + 1
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
if (!(depth > minDepth && depth < maxDepth))
|
if (!(depth >= minDepth && depth <= maxDepth))
|
||||||
return next();
|
return next();
|
||||||
|
|
||||||
address = coin.getAddress();
|
address = coin.getAddress();
|
||||||
|
|
||||||
|
if (!address)
|
||||||
|
return next();
|
||||||
|
|
||||||
hash = coin.getHash('hex');
|
hash = coin.getHash('hex');
|
||||||
|
|
||||||
if (addresses) {
|
if (addresses) {
|
||||||
@ -4092,7 +4096,7 @@ function toBool(obj, def) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toNumber(obj, def) {
|
function toNumber(obj, def) {
|
||||||
if (!utils.isNumber(obj))
|
if (utils.isNumber(obj))
|
||||||
return obj;
|
return obj;
|
||||||
return def != null ? def : -1;
|
return def != null ? def : -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1533,7 +1533,7 @@ WalletDB.prototype.addTX = function addTX(tx, callback, force) {
|
|||||||
if (!wallet)
|
if (!wallet)
|
||||||
return next();
|
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;
|
info.id = wallet.id;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user