From 80391805d24ef0e66dc860a147bdd5e03c33e76b Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 7 Apr 2014 09:46:08 -0300 Subject: [PATCH] Fix #454: when getting pool information of block 0 --- lib/BlockDb.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/BlockDb.js b/lib/BlockDb.js index 0da84e30..0ce250e5 100644 --- a/lib/BlockDb.js +++ b/lib/BlockDb.js @@ -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(); + } }); };