diff --git a/lib/bcoin/block.js b/lib/bcoin/block.js index c0858b1c..29a3bfcc 100644 --- a/lib/bcoin/block.js +++ b/lib/bcoin/block.js @@ -62,7 +62,7 @@ function Block(data, subtype) { if (this.version >= 2) { tx = this.txs[0]; if (tx && tx.inputs[0] && +tx.inputs[0].out.hash === 0) { - var height = bcoin.script.coinbaseHeight(tx.inputs[0].script); + height = bcoin.script.coinbaseHeight(tx.inputs[0].script); if (height > 0) this._height = height; }