block: rename verifyPow to checkProofOfWork
This commit is contained in:
parent
92b446f6a5
commit
e4ba88e54f
2 changed files with 3 additions and 3 deletions
|
@ -132,7 +132,7 @@ Block.calculateTarget = function (bits) {
|
|||
return target
|
||||
}
|
||||
|
||||
Block.prototype.verifyPow = function () {
|
||||
Block.prototype.checkProofOfWork = function () {
|
||||
var hash = [].reverse.call(this.getHash())
|
||||
var target = Block.calculateTarget(this.bits)
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ describe('Block', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('verifyPow', function () {
|
||||
describe('checkProofOfWork', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
var block
|
||||
|
||||
|
@ -106,7 +106,7 @@ describe('Block', function () {
|
|||
})
|
||||
|
||||
it('returns ' + f.valid + ' for ' + f.id, function () {
|
||||
assert.strictEqual(block.verifyPow(), f.valid)
|
||||
assert.strictEqual(block.checkProofOfWork(), f.valid)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue