fix syncHeight.
This commit is contained in:
parent
2d028bb4b4
commit
960ede9db4
@ -1038,7 +1038,7 @@ Chain.prototype._syncHeight = function _syncHeight(callback, force) {
|
||||
if (!unlock)
|
||||
return;
|
||||
|
||||
callback = utils.asyncify(callback);
|
||||
callback = utils.ensure(callback);
|
||||
|
||||
function done(err, result) {
|
||||
unlock();
|
||||
@ -1052,10 +1052,10 @@ Chain.prototype._syncHeight = function _syncHeight(callback, force) {
|
||||
if (chainHeight == null || chainHeight < 0)
|
||||
return done(new Error('Bad chain height.'));
|
||||
|
||||
if (!this.blockdb)
|
||||
if (!self.blockdb)
|
||||
return done();
|
||||
|
||||
this.blockdb.getHeight(function(err, blockHeight) {
|
||||
self.blockdb.getHeight(function(err, blockHeight) {
|
||||
if (err)
|
||||
return done(err);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user