Merge pull request #36 from cmgustavo/bug/01-block-0
Fix #454: when getting pool information of block 0 Ping: https://github.com/bitpay/insight/issues/454
This commit is contained in:
commit
08e125f0b2
|
@ -166,12 +166,15 @@ BlockDb.prototype.getPoolInfo = function(tx, cb) {
|
||||||
tDb._getInfo(tx, function(e, a) {
|
tDb._getInfo(tx, function(e, a) {
|
||||||
if (e) return cb(false);
|
if (e) return cb(false);
|
||||||
|
|
||||||
if (a.isCoinBase) {
|
if (a && a.isCoinBase) {
|
||||||
var coinbaseHexBuffer = new Buffer(a.vin[0].coinbase, 'hex');
|
var coinbaseHexBuffer = new Buffer(a.vin[0].coinbase, 'hex');
|
||||||
var aa = self.poolMatch.match(coinbaseHexBuffer);
|
var aa = self.poolMatch.match(coinbaseHexBuffer);
|
||||||
|
|
||||||
return cb(aa);
|
return cb(aa);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue