diff --git a/CHANGELOG.md b/CHANGELOG.md index 3640018..40b6e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,3 +11,4 @@ v.2 - shell script update - crypto sig on auth - support 2n passphrase +- skip delegate vote diff --git a/README.md b/README.md index ea9f565..8c8644e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,17 @@ Recalculation of rewards occurs every 30 minutes. ## Install +stable version ``` git clone https://github.com/smartholdem/rewarder.git +``` + +or latest version +``` +git clone -b v2.0 https://github.com/smartholdem/rewarder.git +``` + +``` cd rewarder npm install ``` diff --git a/routes/v2/api.js b/routes/v2/api.js index 1b07036..2f37c92 100644 --- a/routes/v2/api.js +++ b/routes/v2/api.js @@ -252,11 +252,13 @@ class Reward { //if (delegate.roundForged > voters.length * 2) { for (let i = 0; i < voters.length; i++) { if (voters[i].waitPay > 1) { - preparedTxs.push(await this.prepareTx({ - amount: (voters[i].waitPay - 1).toFixed(6), // minus fee 1 STH - memo: config.msg + ' ' + voters[i].percent + '% from ' + forPay + ' STH', - recipient: voters[i].address, - })); + if (delegate.address !== voters[i].address) { //skip delegate address + preparedTxs.push(await this.prepareTx({ + amount: (voters[i].waitPay - 1).toFixed(6), // minus fee 1 STH + memo: config.msg + ' ' + voters[i].percent + '% from ' + forPay + ' STH', + recipient: voters[i].address, + })); + } voters[i].totalPay = (voters[i].totalPay + voters[i].waitPay).toFixed(2) * 1; voters[i].waitPay = 0; await db.put('1x' + voters[i].address, voters[i]);