package: bump bs58check, drop node 0.12
This commit is contained in:
parent
4aadbf5e4f
commit
14f9218389
8 changed files with 14 additions and 18 deletions
src
|
@ -1,6 +1,5 @@
|
|||
var bufferutils = require('./bufferutils')
|
||||
var bcrypto = require('./crypto')
|
||||
var bufferReverse = require('buffer-reverse')
|
||||
var fastMerkleRoot = require('merkle-lib/fastRoot')
|
||||
var typeforce = require('typeforce')
|
||||
var types = require('./types')
|
||||
|
@ -80,7 +79,7 @@ Block.prototype.getHash = function () {
|
|||
}
|
||||
|
||||
Block.prototype.getId = function () {
|
||||
return bufferReverse(this.getHash()).toString('hex')
|
||||
return this.getHash().reverse().toString('hex')
|
||||
}
|
||||
|
||||
Block.prototype.getUTCDate = function () {
|
||||
|
@ -164,7 +163,7 @@ Block.prototype.checkMerkleRoot = function () {
|
|||
}
|
||||
|
||||
Block.prototype.checkProofOfWork = function () {
|
||||
var hash = bufferReverse(this.getHash())
|
||||
var hash = this.getHash().reverse()
|
||||
var target = Block.calculateTarget(this.bits)
|
||||
|
||||
return hash.compare(target) <= 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue