diff --git a/lib/coins/xmr.js b/lib/coins/xmr.js index a452111..b51cd2d 100644 --- a/lib/coins/xmr.js +++ b/lib/coins/xmr.js @@ -1,7 +1,7 @@ "use strict"; const bignum = require('bignum'); const cnUtil = require('cryptonote-util'); -const multiHashing = require('multi-hashing'); +const multiHashing = require("cryptonight-hashing"); const crypto = require('crypto'); const debug = require('debug')('coinFuncs'); @@ -162,8 +162,9 @@ function Coin(data){ }; }; - this.cryptoNight = multiHashing.cryptonight; - + this.cryptoNight = function(convertedBlob) { + return multiHashing.cryptonight(convertedBlob, convertedBlob[0] >= 7 ? convertedBlob[0] - 6 : 0); + } } module.exports = Coin; diff --git a/lib/payment_systems/xmr.js b/lib/payment_systems/xmr.js index fe664a9..0a7a1fc 100644 --- a/lib/payment_systems/xmr.js +++ b/lib/payment_systems/xmr.js @@ -304,7 +304,7 @@ let paymentQueue = async.queue(function (paymentDetails, callback) { global.support.rpcWallet(transferFunc, paymentDetails, function (body) { debug("Payment made: " + JSON.stringify(body)); if (body.hasOwnProperty('error')) { - if (body.error.message === "not enough money"){ + if (body.error.message === "not enough money" || body.error.message === "not enough unlocked money"){ console.error("Issue making payments, not enough money, will try later"); if(!extraPaymentRound){ setTimeout(function(){ diff --git a/package.json b/package.json index bbfd876..b3ac489 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ }, "optionalDependencies": { "cryptonote-util": "git://github.com/Snipa22/node-cryptonote-util.git#xmr-Nan-2.0", + "cryptonight-hashing": "git+https://github.com/MoneroOcean/node-cryptonight-hashing.git", "multi-hashing": "git+https://github.com/Snipa22/node-multi-hashing-aesni.git#v0.1" } }