From 87984a72b09efd61845edef2588e39c42f5b26c3 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Tue, 15 Sep 2020 01:00:53 -0500 Subject: [PATCH] Rewards fix and Version Change --- configure.ac | 2 +- contrib/gitian-descriptors/gitian-linux.yml | 2 +- contrib/gitian-descriptors/gitian-osx.yml | 2 +- contrib/gitian-descriptors/gitian-rpi.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 2 +- src/clientversion.h | 2 +- src/smartrewards/rewards.cpp | 26 ++++----------------- src/smartrewards/rewardspayments.cpp | 10 +------- 8 files changed, 12 insertions(+), 36 deletions(-) diff --git a/configure.ac b/configure.ac index cb8d96a9..21a8f8fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 3) -define(_CLIENT_VERSION_REVISION, 2) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2020) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 8fe838ed..b9d2c3bf 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-linux-1.3.2" +name: "smartcash-linux-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 8bcf25f6..8167e7c7 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-osx-1.3.2" +name: "smartcash-osx-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-rpi.yml b/contrib/gitian-descriptors/gitian-rpi.yml index cecbf152..80c17624 100644 --- a/contrib/gitian-descriptors/gitian-rpi.yml +++ b/contrib/gitian-descriptors/gitian-rpi.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-rpi-1.3.1" +name: "smartcash-rpi-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 6a29174d..29ae53ee 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-win-1.3.2" +name: "smartcash-win-1.3.3" enable_cache: true suites: - "trusty" diff --git a/src/clientversion.h b/src/clientversion.h index f7c40f3d..3d67195f 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 3 -#define CLIENT_VERSION_REVISION 2 +#define CLIENT_VERSION_REVISION 3 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 79d20401..a801713b 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -107,29 +107,13 @@ void CSmartRewards::UpdateRoundPayoutParameter() AssertLockHeld(cs_rewardscache); const CSmartRewardRound* round = cache.GetCurrentRound(); - int64_t nBlockPayees = round->nBlockPayees, nBlockInterval; - - int64_t nPayeeCount = round->eligibleEntries - round->disqualifiedEntries; + int64_t nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; + int64_t nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; - if ( nPayeeCount ) { - if ( round->number > (nFirst_1_3_Round + 2) ) { - nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; - nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; - }else if ( round->number > nFirst_1_3_Round ) { - nBlockPayees = 1000; - nBlockInterval = 1; - }else if ( round->number == nFirst_1_3_Round ) { - nBlockPayees = 0; - nBlockInterval = 1; - }else if ( round->number < nFirst_1_3_Round ) { - nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_2_BlockPayees; - nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_2_BlockInterval; - } - } else { - // If there are no eligible smartreward entries - nBlockPayees = 0; - nBlockInterval = 1; + if ( round->number < (nFirst_1_3_Round + 3) ) { + nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_2_BlockPayees; + nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_2_BlockInterval; } cache.UpdateRoundPayoutParameter(nBlockPayees, nBlockInterval); diff --git a/src/smartrewards/rewardspayments.cpp b/src/smartrewards/rewardspayments.cpp index 93695bf3..82fe0962 100644 --- a/src/smartrewards/rewardspayments.cpp +++ b/src/smartrewards/rewardspayments.cpp @@ -135,15 +135,7 @@ void SmartRewardPayments::FillPayments(CMutableTransaction &coinbaseTx, int nHei SmartRewardPayments::Result SmartRewardPayments::Validate(const CBlock& block, int nHeight, CAmount &smartReward) { // Necessary to make the transition from 90030 to 90031 SmartRewards change -/* if (nHeight == 1805799) { - smartReward = 263083560000000; - return SmartRewardPayments::Valid; - } - if (nHeight == 1794799) { - smartReward = 264681480000000; - return SmartRewardPayments::Valid; - } -*/ if (nHeight == 1783799) { + if (nHeight == 1783799) { smartReward = 109307197536547; return SmartRewardPayments::Valid; }