mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-2
@@ -1,11 +1,11 @@
|
||||
2/12/2017
|
||||
---------
|
||||
```sql
|
||||
ALTER TABLE monero_live.config MODIFY item_value TEXT;
|
||||
ALTER TABLE pool.config MODIFY item_value TEXT;
|
||||
```
|
||||
|
||||
2/13/2017
|
||||
---------
|
||||
```sql
|
||||
ALTER TABLE pool.payments ADD transfer_fee BIGINT(20) DEFAULT 0 NULL;
|
||||
```
|
||||
```
|
||||
|
||||
@@ -51,9 +51,11 @@ mkdir ~/pool_db/
|
||||
cp config_example.json config.json
|
||||
cd ~
|
||||
git clone https://github.com/mesh0000/poolui.git
|
||||
cd xmrpoolui
|
||||
cd poolui
|
||||
npm install
|
||||
cd app
|
||||
./node_modules/bower/bin/bower update
|
||||
./node_modules/gulp/bin/gulp.js build
|
||||
cd build
|
||||
sudo ln -s `pwd` /var/www
|
||||
cd /tmp/
|
||||
wget -O caddy.tar.gz 'https://caddyserver.com/download/build?os=linux&arch=amd64&features=cors'
|
||||
@@ -89,4 +91,4 @@ mysql -u root --password=$ROOT_SQL_PASS < deployment/base.sql
|
||||
mysql -u root --password=$ROOT_SQL_PASS pool -e "INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('api', 'authKey', '`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`', 'string', 'Auth key sent with all Websocket frames for validation.')"
|
||||
mysql -u root --password=$ROOT_SQL_PASS pool -e "INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('api', 'secKey', '`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`', 'string', 'HMAC key for Passwords. JWT Secret Key. Changing this will invalidate all current logins.')"
|
||||
pm2 start init.js --name=api --log-date-format="YYYY-MM-DD HH:mm Z" -- --module=api
|
||||
echo "You're setup! Please read the rest of the readme for the remainder of your setup and configuration. These steps include: Setting your Fee Address, Pool Address, Global Domain, and the Mailgun setup!"
|
||||
echo "You're setup! Please read the rest of the readme for the remainder of your setup and configuration. These steps include: Setting your Fee Address, Pool Address, Global Domain, and the Mailgun setup!"
|
||||
|
||||
+12
-7
@@ -296,13 +296,18 @@ let paymentQueue = async.queue(function (paymentDetails, callback) {
|
||||
global.support.rpcWallet(transferFunc, paymentDetails, function (body) {
|
||||
debug("Payment made: " + JSON.stringify(body));
|
||||
if (body.hasOwnProperty('error')) {
|
||||
console.error("Issue making payments" + JSON.stringify(body.error));
|
||||
console.error("Will not make more payments until the payment daemon is restarted!");
|
||||
//toAddress, subject, body
|
||||
global.support.sendEmail(global.config.general.adminEmail, "Payment daemon unable to make payment",
|
||||
"Hello,\r\nThe payment daemon has hit an issue making a payment: " + JSON.stringify(body.error) +
|
||||
". Please investigate and restart the payment daemon as appropriate");
|
||||
return;
|
||||
if (body.error.message === "not enough money"){
|
||||
console.error("Issue making payments, not enough money, will try later");
|
||||
return callback(false);
|
||||
} else {
|
||||
console.error("Issue making payments" + JSON.stringify(body.error));
|
||||
console.error("Will not make more payments until the payment daemon is restarted!");
|
||||
//toAddress, subject, body
|
||||
global.support.sendEmail(global.config.general.adminEmail, "Payment daemon unable to make payment",
|
||||
"Hello,\r\nThe payment daemon has hit an issue making a payment: " + JSON.stringify(body.error) +
|
||||
". Please investigate and restart the payment daemon as appropriate");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (paymentDetails.hasOwnProperty('payment_id')) {
|
||||
console.log("Payment made to " + paymentDetails.destinations[0].address + " with PaymentID: " + paymentDetails.payment_id + " For: " + global.support.coinToDecimal(paymentDetails.destinations[0].amount) + " XMR with a " + global.support.coinToDecimal(body.result.fee) + " XMR Mining Fee");
|
||||
|
||||
Reference in New Issue
Block a user