diff --git a/lib/services/bitcoind/index.js b/lib/services/bitcoind/index.js index 6838bb96..912dfe71 100644 --- a/lib/services/bitcoind/index.js +++ b/lib/services/bitcoind/index.js @@ -123,20 +123,20 @@ Bitcoin.prototype._initDefaults = function(options) { Bitcoin.prototype._initCaches = function() { // caches valid until there is a new block - this.utxosCache = LRU(500); - this.txidsCache = LRU(500); - this.balanceCache = LRU(500); - this.summaryCache = LRU(500); + this.utxosCache = LRU(5); + this.txidsCache = LRU(5); + this.balanceCache = LRU(5); + this.summaryCache = LRU(5); this.blockOverviewCache = LRU(12); - this.transactionDetailedCache = LRU(1000); + this.transactionDetailedCache = LRU(10); // caches valid indefinitely - this.transactionCache = LRU(1000); - this.rawTransactionCache = LRU(500); + this.transactionCache = LRU(10); + this.rawTransactionCache = LRU(5); this.blockCache = LRU(12); this.rawBlockCache = LRU(6); - this.blockHeaderCache = LRU(24); - this.zmqKnownTransactions = LRU(50); + this.blockHeaderCache = LRU(12); + this.zmqKnownTransactions = LRU(5); this.zmqKnownBlocks = LRU(1); this.lastTip = 0; this.lastTipTimeout = false; diff --git a/lib/services/db/sync.js b/lib/services/db/sync.js index a8a31f98..77d00037 100644 --- a/lib/services/db/sync.js +++ b/lib/services/db/sync.js @@ -63,7 +63,7 @@ function Sync(node, db) { this.node = node; this.db = db; this.syncing = false; - this.highWaterMark = 100; + this.highWaterMark = 10; this.progressBar = null; this.lastReportedBlock = 0; } diff --git a/lib/services/wallet-api/index.js b/lib/services/wallet-api/index.js index e51ed54f..526c0d85 100644 --- a/lib/services/wallet-api/index.js +++ b/lib/services/wallet-api/index.js @@ -652,7 +652,7 @@ WalletService.prototype._getUtxos = function(walletId, callback) { outputIndex: key.outputIndex, height: value.height, satoshis: value.satoshis, - script: value.script + scriptPubKey: value.script.toHex() }); }); @@ -761,7 +761,6 @@ WalletService.prototype._removeWallet = function(walletId, callback) { async.map(Object.keys(self._encoding.subKeyMap), function(prefix, next) { var keys = []; - var walletIdBuffer = new Buffer(walletId, 'utf8'); var start = self._encoding.subKeyMap[prefix].fn.call(self._encoding, walletId); var end = new Buffer.concat([self._encoding.subKeyMap[prefix].fn.call(self._encoding, walletId), new Buffer('ff', 'hex')]);