From 6215954ffbb727d2c7af359c0c0b7d4dd93162b2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 4 Oct 2016 13:36:02 -0700 Subject: [PATCH] rpc: update for tx->txdb change. --- lib/http/rpc.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index 16e327ad..c625c177 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -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.');