From 84d9ab580538613c19adf1dd25142fbd07dc6d53 Mon Sep 17 00:00:00 2001 From: TechnoL0g <9394904+technologiespro@users.noreply.github.com> Date: Sat, 26 Sep 2020 19:17:39 +0300 Subject: [PATCH 1/3] version --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ``` From 0cfd1897e2487d581732de745571036b95036fe1 Mon Sep 17 00:00:00 2001 From: TechnoL0g <9394904+technologiespro@users.noreply.github.com> Date: Mon, 28 Sep 2020 11:36:32 +0300 Subject: [PATCH 2/3] skip delegate address --- routes/v2/api.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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]); From 77738ecb1ad54741929efca62bb1a42b61266b29 Mon Sep 17 00:00:00 2001 From: TechnoL0g <9394904+technologiespro@users.noreply.github.com> Date: Mon, 28 Sep 2020 11:37:46 +0300 Subject: [PATCH 3/3] skip delegate address --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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