Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Fix MTP version
Browse files Browse the repository at this point in the history
Change version from 1 to 0x1000. Switch byte order from LE to BE.
  • Loading branch information
JCThePants committed Nov 20, 2018
1 parent 4a0a06c commit 9eb49bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/class.Job.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function Job(args) {
position += 4;

/* MTP version */
headerBuf.writeUInt32LE(mtp.VERSION, position);
headerBuf.writeUInt32BE(mtp.VERSION, position);
position += 4;

/* MTP hash value */
Expand Down Expand Up @@ -242,7 +242,7 @@ function Job(args) {
position += 4;

/* mtp version */
headerBuf.writeUInt32LE(mtp.VERSION, position);
headerBuf.writeUInt32BE(mtp.VERSION, position);

return headerBuf;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/service.mtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const mtp = require('hasher-mtp');

module.exports = {
VERSION: 1,
VERSION: 0x1000,
MTP_L: 64,
POW_LIMIT: 0x00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff,
verify: mtp.verify
Expand Down

0 comments on commit 9eb49bc

Please sign in to comment.