Skip to content

Commit

Permalink
block: variable extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Dec 17, 2015
1 parent 54ac260 commit 293f909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ Block.calculateTarget = function (bits) {

Block.prototype.verifyPow = function () {
var hash = [].reverse.call(this.getHash())
var target = Block.calculateTarget(this.bits)

return compare(hash, Block.calculateTarget(this.bits)) <= 0
return compare(hash, target) <= 0
}

module.exports = Block

0 comments on commit 293f909

Please sign in to comment.