Closed mckenzieja closed 7 years ago
SOLVED
Ran znomp as root.
Dont do that.
Actually still an issue.
I have the same error
I modify return result._65.root; to return result._1.root; then I can run up
How viable is that solution?
I'm working on this now...
The cause of this is probably that Promise.denodeify
is a non-standardized API.
https://www.promisejs.org/api/
Could you all test this commit out? https://github.com/z-classic/node-stratum-pool/compare/test-hash-lookup?expand=1
You'll need to update this file node_modules/stratum-pool/lib/merkleTree.js
with this:
var Promise = require('promise');
var merklebitcoin = Promise.denodeify(require('merkle-bitcoin'));
var util = require('./util.js');
function calcRoot(hashes) {
var result = merklebitcoin(hashes);
//console.log(Object.values(result)[2].root);
return Object.values(result)[2].root;
}
exports.getRoot = function (rpcData, generateTxRaw) {
hashes = [util.reverseBuffer(new Buffer(generateTxRaw, 'hex')).toString('hex')];
rpcData.transactions.forEach(function (value) {
hashes.push(value.hash);
});
if (hashes.length === 1) {
return hashes[0];
}
var result = calcRoot(hashes);
return result;
};
After patch this, I can run z-nomp without jump exception
Great to hear... I'll merge this in then.
For anybody else wanting to use this:
rm -rf node_modules
npm update
npm install
Seemed to do the trick. Spent hours pouring over stratum's dependencies.
I'm thinking it's because no workers are requesting shares?
Solutions attempted:
All other modules report running but whenever the poolspawner spawns a worker, it throws the above error.