wallet/client: fix arg parsing.
This commit is contained in:
parent
749d4edc11
commit
a313ac244c
@ -74,7 +74,7 @@ Config.prototype.init = function init(options) {
|
||||
this.alias[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Inject options.
|
||||
|
||||
@ -26,7 +26,7 @@ class WalletClient extends NodeClient {
|
||||
});
|
||||
|
||||
this.parse('block disconnect', (entry) => {
|
||||
return parseEntry(entry);
|
||||
return [parseEntry(entry)];
|
||||
});
|
||||
|
||||
this.parse('block rescan', (entry, txs) => {
|
||||
@ -34,11 +34,11 @@ class WalletClient extends NodeClient {
|
||||
});
|
||||
|
||||
this.parse('chain reset', (tip) => {
|
||||
return parseEntry(tip);
|
||||
return [parseEntry(tip)];
|
||||
});
|
||||
|
||||
this.parse('tx', (tx) => {
|
||||
return TX.fromRaw(tx);
|
||||
return [TX.fromRaw(tx)];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1789,9 +1789,8 @@ WalletDB.prototype._addBlock = async function _addBlock(entry, txs) {
|
||||
// processed (in the case of a crash).
|
||||
this.logger.warning('Already saw WalletDB block (%d).', tip.height);
|
||||
} else if (tip.height !== this.state.height + 1) {
|
||||
// throw new Error('WDB: Bad connection (height mismatch).');
|
||||
await this.scan(this.state.height);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sync the state to the new tip.
|
||||
@ -1921,7 +1920,6 @@ WalletDB.prototype.rescanBlock = async function rescanBlock(entry, txs) {
|
||||
|
||||
WalletDB.prototype.addTX = async function addTX(tx) {
|
||||
const unlock = await this.txLock.lock();
|
||||
|
||||
try {
|
||||
return await this._insert(tx);
|
||||
} finally {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user