Run pool through MM proxy with Salvium backend
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 37s

This commit is contained in:
Codex Bot
2026-03-21 20:00:18 +01:00
parent 4d43f4efb0
commit d8a3c32ff5
4 changed files with 127 additions and 40 deletions

View File

@@ -2,10 +2,17 @@ function getLegacySoloBackend() {
return {
name: 'solo',
type: 'solo',
coin: config.coin,
symbol: config.symbol,
host: (config.miningSource && config.miningSource.host) || config.daemon.host,
port: (config.miningSource && config.miningSource.port) || config.daemon.port,
alwaysPoll: (config.miningSource && config.miningSource.alwaysPoll) || config.daemon.alwaysPoll || false,
walletAddress: null
walletAddress: null,
cnAlgorithm: config.cnAlgorithm || 'cryptonight',
cnVariant: config.cnVariant || 0,
cnBlobType: config.cnBlobType || 0,
includeHeight: typeof config.includeHeight !== 'undefined' ? config.includeHeight : false,
isRandomX: config.isRandomX || false
};
}
@@ -37,10 +44,17 @@ function normalizeBackend(name, backend) {
name: name,
type: backend.type || (name === 'solo' ? 'solo' : 'merge-mining'),
parentCoin: backend.parentCoin || null,
coin: backend.coin || config.coin,
symbol: backend.symbol || config.symbol,
host: backend.host,
port: backend.port,
alwaysPoll: backend.alwaysPoll || false,
walletAddress: backend.walletAddress || null
walletAddress: backend.walletAddress || null,
cnAlgorithm: backend.cnAlgorithm || config.cnAlgorithm || 'cryptonight',
cnVariant: typeof backend.cnVariant !== 'undefined' ? backend.cnVariant : (config.cnVariant || 0),
cnBlobType: typeof backend.cnBlobType !== 'undefined' ? backend.cnBlobType : (config.cnBlobType || 0),
includeHeight: typeof backend.includeHeight !== 'undefined' ? backend.includeHeight : (typeof config.includeHeight !== 'undefined' ? config.includeHeight : false),
isRandomX: typeof backend.isRandomX !== 'undefined' ? backend.isRandomX : (config.isRandomX || false)
};
}
@@ -85,3 +99,17 @@ function isSoloMiningBackend() {
return getActiveMiningBackend().type === 'solo';
}
exports.isSoloMiningBackend = isSoloMiningBackend;
function getActiveMiningParams() {
let backend = getActiveMiningBackend();
return {
coin: backend.coin,
symbol: backend.symbol,
cnAlgorithm: backend.cnAlgorithm,
cnVariant: backend.cnVariant,
cnBlobType: backend.cnBlobType,
includeHeight: backend.includeHeight,
isRandomX: backend.isRandomX
};
}
exports.getActiveMiningParams = getActiveMiningParams;