fix blockdb check
This commit is contained in:
parent
99a9050261
commit
108a327d5a
|
@ -283,7 +283,7 @@ BlockDb.prototype.fromHashWithInfo = function(hash, cb) {
|
||||||
self.getHeight(hash, function(err, height) {
|
self.getHeight(hash, function(err, height) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
info.isMainChain = height ? true : false;
|
info.isMainChain = height>=0 ? true : false;
|
||||||
|
|
||||||
return cb(null, {
|
return cb(null, {
|
||||||
hash: hash,
|
hash: hash,
|
||||||
|
|
Loading…
Reference in New Issue