Fix #454: when getting pool information of block 0

This commit is contained in:
Gustavo Cortez 2014-04-07 09:46:08 -03:00
parent 55ce11e8fc
commit 80391805d2
1 changed files with 4 additions and 1 deletions

View File

@ -166,12 +166,15 @@ BlockDb.prototype.getPoolInfo = function(tx, cb) {
tDb._getInfo(tx, function(e, a) {
if (e) return cb(false);
if (a.isCoinBase) {
if (a && a.isCoinBase) {
var coinbaseHexBuffer = new Buffer(a.vin[0].coinbase, 'hex');
var aa = self.poolMatch.match(coinbaseHexBuffer);
return cb(aa);
}
else {
return cb();
}
});
};