logger
This commit is contained in:
parent
2870fe8aa3
commit
aa5d986217
@ -180,7 +180,7 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream
|
||||
options.from = options.from || 0;
|
||||
options.to = options.to || 0xffffffff;
|
||||
|
||||
if(!callback){ //if only 3 args, then streamer is callback
|
||||
if(typeof callback !== 'function'){ //if only 3 args, then streamer is callback
|
||||
callback = streamer;
|
||||
streamer = () => null; //NULL fn
|
||||
}
|
||||
@ -285,7 +285,7 @@ AddressService.prototype.getAddressSummary = function(address, options, streamer
|
||||
options.queryMempool = true;
|
||||
}
|
||||
|
||||
if(!callback){ //if only 3 args, then streamer is callback
|
||||
if(typeof callback !== 'function'){ //if only 3 args, then streamer is callback
|
||||
callback = streamer;
|
||||
streamer = () => null; //NULL fn
|
||||
}
|
||||
@ -786,15 +786,14 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre
|
||||
});
|
||||
|
||||
txIdTransformStream.on('end', function() {
|
||||
q.drain = (e, d) => {
|
||||
console.debug("Q-DRAIN", e, d)
|
||||
next();
|
||||
};
|
||||
q.drain = next;
|
||||
console.debug(q.drain);
|
||||
q.resume();
|
||||
});
|
||||
|
||||
txIdTransformStream._transform = function(chunk, enc, cb) {
|
||||
var txInfo = self._encoding.decodeAddressIndexKey(chunk);
|
||||
self._db.get(chunk, (err, data) => console.debug(data)); //test-check
|
||||
q.push({ txid: txInfo.txid, height: txInfo.height }, process_chunk);
|
||||
|
||||
cb();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user