Made local transform stream.
This commit is contained in:
parent
492895538a
commit
835ab3b617
@ -17,7 +17,6 @@ var LRU = require('lru-cache');
|
||||
var Encoding = require('./encoding');
|
||||
var Input = require('bitcore-lib').Transaction.Input;
|
||||
var Transform = require('stream').Transform;
|
||||
var transform = new Transform({ objectMode: true, highWaterMark: 1000000 });
|
||||
|
||||
var WalletService = function(options) {
|
||||
BaseService.call(this, options);
|
||||
@ -664,6 +663,7 @@ WalletService.prototype._endpointGetTransactions = function() {
|
||||
walletId: walletId
|
||||
};
|
||||
|
||||
var transform = new Transform({ objectMode: true, highWaterMark: 1000000 });
|
||||
//txids are sent in and the actual tx's are found here
|
||||
transform._transform = function(chunk, enc, callback) {
|
||||
|
||||
@ -686,7 +686,6 @@ WalletService.prototype._endpointGetTransactions = function() {
|
||||
};
|
||||
|
||||
transform._flush = function(callback) {
|
||||
stream.unpipe(transform);
|
||||
self.db.resumeSync();
|
||||
callback();
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user