@dashevo/dashcore-lib
Advanced tools
Comparing version 0.19.12 to 0.19.13
@@ -68,3 +68,3 @@ const { isObject, isString } = require('lodash'); | ||
if (isString(blockHash)) { | ||
blockHash = BufferUtil.reverse(Buffer.from(blockHash, 'hex')); | ||
blockHash = Buffer.from(blockHash, 'hex'); | ||
} | ||
@@ -90,3 +90,3 @@ | ||
info.height = br.readInt32LE(); | ||
info.blockHash = br.read(SHA256_HASH_SIZE); | ||
info.blockHash = br.readReverse(SHA256_HASH_SIZE); | ||
info.signature = br.read(BLS_SIGNATURE_SIZE); | ||
@@ -220,3 +220,3 @@ return info; | ||
getHash() { | ||
return doubleSha256(this.toBuffer()).reverse(); | ||
return doubleSha256(this.toBuffer()); | ||
} | ||
@@ -274,3 +274,3 @@ | ||
bufferWriter.writeReverse(requestId); | ||
bufferWriter.write(blockHash); | ||
bufferWriter.writeReverse(blockHash); | ||
return doubleSha256(bufferWriter.toBuffer()); | ||
@@ -286,3 +286,3 @@ } | ||
height: this.height, | ||
blockHash: BufferUtil.reverse(this.blockHash).toString('hex'), | ||
blockHash: this.blockHash.toString('hex'), | ||
signature: this.signature.toString('hex'), | ||
@@ -323,3 +323,3 @@ }; | ||
bufferWriter.writeInt32LE(this.height); | ||
bufferWriter.write(this.blockHash); | ||
bufferWriter.write(Buffer.from(this.blockHash).reverse()); | ||
bufferWriter.write(this.signature); | ||
@@ -343,4 +343,3 @@ return bufferWriter; | ||
inspect() { | ||
const reversedBlockHash = BufferUtil.reverse(this.blockHash).toString('hex'); | ||
return `<ChainLock: ${reversedBlockHash}, height: ${this.height}>`; | ||
return `<ChainLock: ${this.blockHash.toString('hex')}, height: ${this.height}>`; | ||
} | ||
@@ -347,0 +346,0 @@ } |
{ | ||
"name": "@dashevo/dashcore-lib", | ||
"version": "0.19.12", | ||
"version": "0.19.13", | ||
"description": "A pure and powerful JavaScript Dash library.", | ||
@@ -5,0 +5,0 @@ "author": "Dash Core Group, Inc. <dev@dash.org>", |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
2738565
187
22298