Browse Source

armor against null or empty miner config

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
de7b6fe78e
  1. 2
      routes/baseActionsRouter.js

2
routes/baseActionsRouter.js

@ -544,11 +544,13 @@ router.get("/address/:address", function(req, res) {
} }
} }
if (global.miningPoolsConfigs) {
for (var i = 0; i < global.miningPoolsConfigs.length; i++) { for (var i = 0; i < global.miningPoolsConfigs.length; i++) {
if (global.miningPoolsConfigs[i].payout_addresses[address]) { if (global.miningPoolsConfigs[i].payout_addresses[address]) {
res.locals.payoutAddressForMiner = global.miningPoolsConfigs[i].payout_addresses[address]; res.locals.payoutAddressForMiner = global.miningPoolsConfigs[i].payout_addresses[address];
} }
} }
}
coreApi.getAddress(address).then(function(validateaddressResult) { coreApi.getAddress(address).then(function(validateaddressResult) {
res.locals.result.validateaddress = validateaddressResult; res.locals.result.validateaddress = validateaddressResult;

Loading…
Cancel
Save