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