block: variable extraction
This commit is contained in:
parent
bac700f52c
commit
92b446f6a5
@ -134,8 +134,9 @@ Block.calculateTarget = function (bits) {
|
|||||||
|
|
||||||
Block.prototype.verifyPow = function () {
|
Block.prototype.verifyPow = function () {
|
||||||
var hash = [].reverse.call(this.getHash())
|
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
|
module.exports = Block
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user