diff --git a/lib/bcoin/block.js b/lib/bcoin/block.js index ad9720b5..44fbff26 100644 --- a/lib/bcoin/block.js +++ b/lib/bcoin/block.js @@ -419,6 +419,7 @@ Block.prototype.getCoinbaseHeight = function getCoinbaseHeight() { return -1; height = coinbase.inputs[0].script.getCoinbaseHeight(); + this._cbHeight = height; return height; @@ -472,8 +473,8 @@ Block.prototype.getClaimed = function getClaimed() { * @returns {Amount} */ -Block.reward = function _reward(height, network) { - var halvings, reward; +Block.reward = function reward(height, network) { + var halvings; assert(height >= 0, 'Bad height for reward.');