fix vars.
This commit is contained in:
parent
5de30139ae
commit
9619779426
@ -74,6 +74,8 @@ BlockDB.prototype.migrate = function migrate(blockSize, compression, callback) {
|
||||
if (compression != null)
|
||||
options.compression = compression;
|
||||
|
||||
options.maxOpenFiles = 60000;
|
||||
|
||||
utils.print('Migrating DB with options:');
|
||||
utils.print(options);
|
||||
|
||||
@ -579,6 +581,8 @@ BlockDB.prototype.getCoin = function getCoin(hash, index, callback) {
|
||||
var id = 'u/t/' + hash + '/' + index;
|
||||
|
||||
this.index.get(id, function(err, record) {
|
||||
var record;
|
||||
|
||||
if (err) {
|
||||
if (err.type === 'NotFoundError')
|
||||
return callback();
|
||||
@ -661,8 +665,6 @@ BlockDB.prototype._getTXByAddress = function _getTXByAddress(address, callback)
|
||||
stream.on('data', function(data) {
|
||||
var parts = data.key.split('/').slice(3);
|
||||
var hash = parts[0];
|
||||
// Could store block hash in key
|
||||
// var blockHash = parts[1];
|
||||
var record = self.parseOffset(data.value);
|
||||
|
||||
pending++;
|
||||
@ -729,6 +731,8 @@ BlockDB.prototype.getTX = function getTX(hash, callback) {
|
||||
var id = 't/t/' + hash;
|
||||
|
||||
this.index.get(id, function(err, record) {
|
||||
var record;
|
||||
|
||||
if (err) {
|
||||
if (err.type === 'NotFoundError')
|
||||
return callback();
|
||||
@ -771,6 +775,8 @@ BlockDB.prototype.getBlock = function getBlock(hash, callback) {
|
||||
id = 'b/h/' + value;
|
||||
|
||||
this.index.get(id, function(err, record) {
|
||||
var record;
|
||||
|
||||
if (err) {
|
||||
if (err.type === 'NotFoundError')
|
||||
return callback();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user