Skip to content

Commit

Permalink
Rewards fix and Version Change
Browse files Browse the repository at this point in the history
  • Loading branch information
thesolarminer committed Sep 15, 2020
1 parent fe11374 commit 87984a7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 36 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "smartcash-linux-1.3.2"
name: "smartcash-linux-1.3.3"
enable_cache: true
suites:
- "trusty"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "smartcash-osx-1.3.2"
name: "smartcash-osx-1.3.3"
enable_cache: true
suites:
- "trusty"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-rpi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "smartcash-rpi-1.3.1"
name: "smartcash-rpi-1.3.3"
enable_cache: true
suites:
- "trusty"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "smartcash-win-1.3.2"
name: "smartcash-win-1.3.3"
enable_cache: true
suites:
- "trusty"
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 5 additions & 21 deletions src/smartrewards/rewards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 1 addition & 9 deletions src/smartrewards/rewardspayments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 87984a7

Please sign in to comment.