rpc: update for tx->txdb change.
This commit is contained in:
parent
74fde4bc51
commit
6215954ffb
@ -3168,7 +3168,7 @@ RPC.prototype.getwalletinfo = co(function* getwalletinfo(args) {
|
||||
|
||||
balance = yield this.wallet.getBalance();
|
||||
|
||||
hashes = yield this.wallet.tx.getHistoryHashes(this.wallet.id);
|
||||
hashes = yield this.wallet.txdb.getHistoryHashes(this.wallet.id);
|
||||
|
||||
return {
|
||||
walletversion: 0,
|
||||
@ -3343,7 +3343,7 @@ RPC.prototype.listlockunspent = function listlockunspent(args) {
|
||||
if (args.help || args.length > 0)
|
||||
return Promise.reject(new RPCError('listlockunspent'));
|
||||
|
||||
outpoints = this.wallet.tx.getLocked();
|
||||
outpoints = this.wallet.txdb.getLocked();
|
||||
out = [];
|
||||
|
||||
for (i = 0; i < outpoints.length; i++) {
|
||||
@ -3725,7 +3725,7 @@ RPC.prototype.listunspent = co(function* listunspent(args) {
|
||||
scriptPubKey: coin.script.toJSON(),
|
||||
amount: +utils.btc(coin.value),
|
||||
confirmations: depth,
|
||||
spendable: !this.wallet.tx.isLocked(coin),
|
||||
spendable: !this.wallet.txdb.isLocked(coin),
|
||||
solvable: true
|
||||
});
|
||||
}
|
||||
@ -3745,7 +3745,7 @@ RPC.prototype.lockunspent = function lockunspent(args) {
|
||||
|
||||
if (args.length === 1) {
|
||||
if (unlock)
|
||||
this.wallet.tx.unlockCoins();
|
||||
this.wallet.txdb.unlockCoins();
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
@ -4061,7 +4061,7 @@ RPC.prototype.removeprunedfunds = co(function* removeprunedfunds(args) {
|
||||
if (!hash)
|
||||
throw new RPCError('Invalid parameter.');
|
||||
|
||||
removed = yield this.wallet.tx.remove(hash);
|
||||
removed = yield this.wallet.remove(hash);
|
||||
|
||||
if (!removed)
|
||||
throw new RPCError('Transaction not in wallet.');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user