minor fixes.

This commit is contained in:
Christopher Jeffrey 2016-06-03 15:22:28 -07:00
parent a5945c1d98
commit 055e5665e3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 8 additions and 8 deletions

View File

@ -1458,7 +1458,7 @@ Chain.prototype.add = function add(block, callback, force) {
if (height > self.bestHeight) {
self.bestHeight = height;
self.network.height = height;
self.network.updateHeight(height);
}
// If previous block wasn't ever seen,
@ -1475,7 +1475,7 @@ Chain.prototype.add = function add(block, callback, force) {
// getblocks sync, making it an orphan).
if (block.getCoinbaseHeight() > self.bestHeight) {
self.bestHeight = block.getCoinbaseHeight();
self.network.height = self.bestHeight;
self.network.updateHeight(self.bestHeight);
}
self.emit('orphan', block, {

View File

@ -145,12 +145,12 @@ ldb.parseOptions = function parseOptions(options) {
*/
ldb.destroy = function destroy(options, callback) {
var backend = ldb.parseOptions(options).db;
options = ldb.parseOptions(options);
if (!backend.destroy)
if (!options.db.destroy)
return utils.nextTick(callback);
backend.destroy(options.location, callback);
options.db.destroy(options.location, callback);
};
/**
@ -160,12 +160,12 @@ ldb.destroy = function destroy(options, callback) {
*/
ldb.repair = function repair(options, callback) {
var backend = ldb.parseOptions(options).db;
options = ldb.parseOptions(options);
if (!backend.repair)
if (!options.db.repair)
return utils.asyncify(callback)(new Error('Cannot repair.'));
backend.repair(options.location, callback);
options.db.repair(options.location, callback);
};
/*