Browse Source

block: rename verifyPow to checkProofOfWork

hk-custom-address
Daniel Cousens 9 years ago
parent
commit
e4ba88e54f
  1. 2
      src/block.js
  2. 4
      test/block.js

2
src/block.js

@ -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)

4
test/block.js

@ -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…
Cancel
Save