Skip to content

Commit 238cf5e

Browse files
committed
Update with new Cryptonight-Hashing library + the required changes for XMR. Thanks to Mayday30/MoneroOcean for getting an updated lib together.
1 parent 9f6bc9d commit 238cf5e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

lib/xmr.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
2-
const multiHashing = require('multi-hashing');
2+
const multiHashing = require("cryptonight-hashing");
33
const cnUtil = require('cryptonote-util');
44
const bignum = require('bignum');
55
const support = require('./support.js')();
@@ -232,11 +232,14 @@ let devPool = {
232232
"devPool": true
233233
};
234234

235+
function syncHash (convertedBlob) {
236+
return multiHashing.cryptonight(convertedBlob, convertedBlob[0] >= 7 ? convertedBlob[0] - 6 : 0);
237+
}
238+
235239
module.exports = function () {
236240
return {
237241
devPool: devPool,
238-
hashSync: multiHashing.cryptonight,
239-
hashAsync: multiHashing.CNAsync,
242+
hashSync: syncHash,
240243
blockHeightCheck: blockHeightCheck,
241244
getRemoteNodes: getRemoteNodes,
242245
BlockTemplate: BlockTemplate,

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xmr-node-proxy",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Node proxy for XMR pools based on nodejs-pool, should support any coins that nodejs-pool does with little work",
55
"main": "proxy.js",
66
"scripts": {
@@ -37,6 +37,7 @@
3737
},
3838
"optionalDependencies": {
3939
"cryptonote-util": "git://github.com/Snipa22/node-cryptonote-util.git#xmr-Nan-2.0",
40-
"multi-hashing": "git+https://github.com/Snipa22/node-multi-hashing-aesni.git#v0.1"
40+
"multi-hashing": "git+https://github.com/Snipa22/node-multi-hashing-aesni.git#v0.1",
41+
"cryptonight-hashing": "git+https://github.com/MoneroOcean/node-cryptonight-hashing.git"
4142
}
4243
}

proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function Pool(poolData){
260260
this.sendData('login', {
261261
login: this.username,
262262
pass: this.password,
263-
agent: 'xmr-node-proxy/0.0.1'
263+
agent: 'xmr-node-proxy/0.0.2'
264264
});
265265
this.active = true;
266266
for (let worker in cluster.workers){

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy