Browse Source

make payment on startup option via pool_config

dev
webworker01 5 years ago
parent
commit
2a61309db7
  1. 9
      README.md
  2. 9
      libs/paymentProcessor.js

9
README.md

@ -80,6 +80,15 @@ Payment Processing
-------------
Please note that the default configs generated are for solo mining. If you wish to create a public pool please modify the configs like in this [example config](https://github.com/z-classic/z-nomp/blob/master/pool_configs/komodo_example.json)
There is now a config option you can add to your pool_configs/coin.json to toggle making an attempt at a payment upon pool startup.
```
"paymentProcessing": {
"payOnStart": true,
...
}
```
Invalid Worker Addresses
-------------
You can add an option to your pool_config to have any miners that mine with an invalid address (if they somehow get through) to pay out to an address of your choosing

9
libs/paymentProcessor.js

@ -34,7 +34,7 @@ module.exports = function(logger){
logger.debug(logSystem, logComponent, 'Payment processing setup with daemon ('
+ processingConfig.daemon.user + '@' + processingConfig.daemon.host + ':' + processingConfig.daemon.port
+ ') and redis (' + poolOptions.redis.host + ':' + poolOptions.redis.port + ')');
+ ') and redis (' + poolOptions.redis.host + ':' + poolOptions.redis.port + ')');
});
});
};
@ -181,7 +181,12 @@ function SetupForPool(logger, poolOptions, setupFinished) {
if (paymentInterval) {
clearInterval(paymentInterval);
}
processPayments();
//Make payment on startup if "paymentProcessing" : { "payOnStart": true } is set
if (typeof processingConfig.payOnStart !== 'undefined' && processingConfig.payOnStart) {
processPayments();
}
paymentInterval = setInterval(processPayments, paymentIntervalSecs * 1000);
//setTimeout(processPayments, 100);
setupFinished(true);

Loading…
Cancel
Save