From a096667593a605d3de574ccad71ac46654513ac2 Mon Sep 17 00:00:00 2001 From: thesolarminer Date: Mon, 7 Sep 2020 11:02:16 -0500 Subject: [PATCH 1/8] Update request limits --- src/sapi/sapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sapi/sapi.h b/src/sapi/sapi.h index 58bbbf78..5d5cf32f 100644 --- a/src/sapi/sapi.h +++ b/src/sapi/sapi.h @@ -194,8 +194,8 @@ namespace Validation{ namespace Limits { - const int64_t nRequestsPerInterval = 20; - const int64_t nRequestIntervalMs = 5000; + const int64_t nRequestsPerInterval = 200; + const int64_t nRequestIntervalMs = 2000; const int64_t nClientRemovalMs = 10 * 60 * 1000; class Client{ From 2db2e6988193e1718bdfbdd45e3d5abefe3df2db Mon Sep 17 00:00:00 2001 From: Solarminer Date: Sun, 13 Sep 2020 00:47:38 -0500 Subject: [PATCH 2/8] Add minpeerprotocol option and update checkpoint --- src/chainparams.cpp | 11 ++++++----- src/init.cpp | 3 +++ src/util.cpp | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index a03868f5..cfe888a7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -104,10 +104,10 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000004c9f08a418c8643752"); + consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000004cf8b731421c64f500"); // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x00000000000031b508294533c338d33961685b2cea7409db7466fe519bfadb45"); // 1784380 + consensus.defaultAssumeValid = uint256S("0x000000000000413fe282ddefc3a73689d6fab91e1b3ec70e873070b2a0fd83df"); // 1795520 // smartnode params consensus.nSmartnodePaymentsStartBlock = HF_V1_1_SMARTNODE_HEIGHT; // not true, but it's ok as long as it's less then nSmartnodePaymentsIncreaseBlock @@ -222,9 +222,10 @@ class CMainParams : public CChainParams { ( 1500000, uint256S("0x0000000000001e396ce1ea9dfde2956fef0f606a5d6cbbcb1a5ba6e1081eadf5")) ( 1599000, uint256S("0x00000000000024edb61519ed6ebdf085f5dd25a0963103dc108b68e5f88604f3")) ( 1725000, uint256S("0x0000000000002916acfe2598244cb207cd094e83c170cb5627868c522f3a0d03")) - ( 1763000, uint256S("0x000000000000029c03b91dea261d213bdece8428a4cf73cffd11b6c237e41379")), - 1598177270, // * UNIX timestamp of last checkpoint block - 13477920, // * total number of transactions between genesis and last checkpoint + ( 1763000, uint256S("0x000000000000029c03b91dea261d213bdece8428a4cf73cffd11b6c237e41379")) + ( 1795000, uint256S("0x00000000000000d87d14d7615cb56d92fe58a7c8515af977a9d540d1adb5cceb")), + 1599945921, // * UNIX timestamp of last checkpoint block + 13686967, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 2000.0 // * estimated number of transactions per day after checkpoint }; diff --git a/src/init.cpp b/src/init.cpp index 4e36dfe7..49eee183 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -42,6 +42,7 @@ #include "utilmoneystr.h" #include "utilstrencodings.h" #include "validationinterface.h" +#include "version.h" #include "warnings.h" #ifdef ENABLE_WALLET #include "wallet/db.h" @@ -488,6 +489,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-maxreceivebuffer=", strprintf(_("Maximum per-connection receive buffer, *1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER)); strUsage += HelpMessageOpt("-maxsendbuffer=", strprintf(_("Maximum per-connection send buffer, *1000 bytes (default: %u)"), DEFAULT_MAXSENDBUFFER)); strUsage += HelpMessageOpt("-maxtimeadjustment", strprintf(_("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)"), DEFAULT_MAX_TIME_ADJUSTMENT)); + strUsage += HelpMessageOpt("-minpeerprotocol=", strprintf(_("Minimimum protocol to connect (default: %u)"), MIN_PEER_PROTO_VERSION)); strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG)); @@ -1104,6 +1106,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } #endif } + static const int MIN_PEER_PROTO_VERSION = GetArg("-minpeerprotocol", MIN_PEER_PROTO_VERSION); // Make sure enough file descriptors are available int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1); diff --git a/src/util.cpp b/src/util.cpp index 84f5c7db..d560353c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -109,7 +109,7 @@ int nWalletBackups = 10; const char * const BITCOIN_CONF_FILENAME = "smartcash.conf"; const char * const BITCOIN_PID_FILENAME = "smartcashd.pid"; -const std::vector args = {"version", "alertnotify", "blocknotify", "blocksonly", "checkblocks", "checklevel", "conf", "daemon", "datadir", "dbcache", "feefilter", "loadblock", "maxorphantx", "maxmempool", "mempoolexpiry", "par", "pid", "prune", "reindex-chainstate", "reindex", "sysperms", "depositindex", "addnode", "banscore", "bantime", "bind", "connect", "discover", "dns", "dnsseed", "externalip", "forcednsseed", "listen", "listenonion", "maxconnections", "maxreceivebuffer", "maxsendbuffer", "maxtimeadjustment", "onion", "onlynet", "permitbaremultisig", "peerbloomfilters", "port", "proxy", "proxyrandomize", "rpcserialversion", "seednode", "timeout", "torcontrol", "torpassword", "upnp", "whitebind", "whitelist", "whitelistrelay", "whitelistforcerelay", "maxuploadtarget", "zmqpubhashblock", "zmqpubhashtx", "zmqpubrawblock", "zmqpubrawtx", "uacomment", "checkblockindex", "checkmempool", "checkpoints", "disablesafemode", "testsafemode", "dropmessagestest", "fuzzmessagestest", "stopafterblockimport", "limitancestorcount", "limitancestorsize", "limitdescendantcount", "limitdescendantsize", "bip9params", "debug", "nodebug", "help-debug", "logips", "logtimestamps", "logtimemicros", "mocktime", "limitfreerelay", "relaypriority", "maxsigcachesize", "maxtipage", "minrelaytxfee", "maxtxfee", "printtoconsole", "printpriority", "shrinkdebugfile", "acceptnonstdtxn", "bytespersigop", "datacarrier", "datacarriersize", "mempoolreplacement", "blockmaxweight", "blockmaxsize", "txmaxcount", "blockprioritysize", "blockversion", "server", "rest", "rpcbind", "rpccookiefile", "rpcuser", "rpcpassword", "rpcauth", "rpcport", "rpcallowip", "rpcthreads", "rpcworkqueue", "rpcservertimeout", "help", "?", "disablewallet", "keypool", "fallbackfee", "mintxfee", "paytxfee", "rescan", "salvagewallet", "sendfreetransactions", "spendzeroconfchange", "txconfirmtarget", "usehd", "upgradewallet", "wallet", "walletbroadcast", "walletnotify", "zapwallettxes", "dblogsize", "flushwallet", "privdb", "walletrejectlongchains", "testnet", "usenewaddressformat", "sapi", "sapiport", "sapithreads", "sapiworkqueue", "sapiservertimeout", "sapiwhitelist"}; +const std::vector args = {"version", "alertnotify", "blocknotify", "blocksonly", "checkblocks", "checklevel", "conf", "daemon", "datadir", "dbcache", "feefilter", "loadblock", "maxorphantx", "maxmempool", "mempoolexpiry", "par", "pid", "prune", "reindex-chainstate", "reindex", "sysperms", "depositindex", "addnode", "banscore", "bantime", "bind", "connect", "discover", "dns", "dnsseed", "externalip", "forcednsseed", "listen", "listenonion", "maxconnections", "maxreceivebuffer", "maxsendbuffer", "maxtimeadjustment", "minpeerprotocol", "onion", "onlynet", "permitbaremultisig", "peerbloomfilters", "port", "proxy", "proxyrandomize", "rpcserialversion", "seednode", "timeout", "torcontrol", "torpassword", "upnp", "whitebind", "whitelist", "whitelistrelay", "whitelistforcerelay", "maxuploadtarget", "zmqpubhashblock", "zmqpubhashtx", "zmqpubrawblock", "zmqpubrawtx", "uacomment", "checkblockindex", "checkmempool", "checkpoints", "disablesafemode", "testsafemode", "dropmessagestest", "fuzzmessagestest", "stopafterblockimport", "limitancestorcount", "limitancestorsize", "limitdescendantcount", "limitdescendantsize", "bip9params", "debug", "nodebug", "help-debug", "logips", "logtimestamps", "logtimemicros", "mocktime", "limitfreerelay", "relaypriority", "maxsigcachesize", "maxtipage", "minrelaytxfee", "maxtxfee", "printtoconsole", "printpriority", "shrinkdebugfile", "acceptnonstdtxn", "bytespersigop", "datacarrier", "datacarriersize", "mempoolreplacement", "blockmaxweight", "blockmaxsize", "txmaxcount", "blockprioritysize", "blockversion", "server", "rest", "rpcbind", "rpccookiefile", "rpcuser", "rpcpassword", "rpcauth", "rpcport", "rpcallowip", "rpcthreads", "rpcworkqueue", "rpcservertimeout", "help", "?", "disablewallet", "keypool", "fallbackfee", "mintxfee", "paytxfee", "rescan", "salvagewallet", "sendfreetransactions", "spendzeroconfchange", "txconfirmtarget", "usehd", "upgradewallet", "wallet", "walletbroadcast", "walletnotify", "zapwallettxes", "dblogsize", "flushwallet", "privdb", "walletrejectlongchains", "testnet", "usenewaddressformat", "sapi", "sapiport", "sapithreads", "sapiworkqueue", "sapiservertimeout", "sapiwhitelist"}; map mapArgs; map > mapMultiArgs; From 83e1f969cd3a62e2e156f93c8390adbfa6ae89c8 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Sun, 13 Sep 2020 13:36:19 -0500 Subject: [PATCH 3/8] Rewards Round Payee Fix --- src/smartrewards/rewards.cpp | 41 +++++++++++++----------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 990cb642..6842c5a9 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -112,32 +112,21 @@ void CSmartRewards::UpdateRoundPayoutParameter() int64_t nPayeeCount = round->eligibleEntries - round->disqualifiedEntries; int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; - if ( round->number < nFirst_1_3_Round ) { - nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_2_BlockPayees; - nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_2_BlockInterval; - } else if ( nPayeeCount ) { - int64_t nBlockStretch = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch; - int64_t nBlocksPerRound = Params().GetConsensus().nRewardsBlocksPerRound_1_3; - int64_t nTempBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; - - nBlockPayees = std::max(nTempBlockPayees, (nPayeeCount / nBlockStretch * nTempBlockPayees) + 1); - - if (nPayeeCount > nBlockPayees) { - int64_t nStartDelayBlocks = Params().GetConsensus().nRewardsPayoutStartDelay; - int64_t nBlocksTarget = nStartDelayBlocks + nBlocksPerRound; - nBlockInterval = ((nBlockStretch * nBlockPayees) / nPayeeCount) + 1; - int64_t nStretchedLength = nPayeeCount / nBlockPayees * (nBlockInterval); - - if (nStretchedLength > nBlocksTarget) { - nBlockInterval--; - } else if (nStretchedLength < nBlockStretch) { - nBlockInterval++; - } - - } else { - // If its only one block to pay - nBlockInterval = 1; - } + if ( nPayeeCount ) { + if ( round->number > (nFirst_1_3_Round +1) ) { + nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; + BlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; + int64_t nStretchedLength = 5 * ((nPayeeCount / nBlockPayees)+1) + }else if ( round->number == (nFirst_1_3_Round +1) ) { + nBlockPayees = 1000; + BlockInterval = 1; + int64_t nStretchedLength = 1 + }else if ( round->number == (nFirst_1_3_Round +1) ) { + nBlockPayees = 0; + BlockInterval = 0; + }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 From 5042380ab1b38c293e63d0878c2953d5057d35d4 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Sun, 13 Sep 2020 13:57:25 -0500 Subject: [PATCH 4/8] Adjustments --- src/smartrewards/rewards.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 6842c5a9..d969c879 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -113,21 +113,19 @@ void CSmartRewards::UpdateRoundPayoutParameter() int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; if ( nPayeeCount ) { - if ( round->number > (nFirst_1_3_Round +1) ) { + if ( round->number > (nFirst_1_3_Round + 1) ) { nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; - BlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; - int64_t nStretchedLength = 5 * ((nPayeeCount / nBlockPayees)+1) - }else if ( round->number == (nFirst_1_3_Round +1) ) { + nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; + }else if ( round->number == (nFirst_1_3_Round + 1) ) { nBlockPayees = 1000; - BlockInterval = 1; - int64_t nStretchedLength = 1 - }else if ( round->number == (nFirst_1_3_Round +1) ) { + nBlockInterval = 1; + }else if ( round->number == nFirst_1_3_Round ) { nBlockPayees = 0; - BlockInterval = 0; - }else if ( round->number < nFirst_1_3_Round ) { + nBlockInterval = 0; + }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; From 9b5f1adba1bb6f39a68d8d8386cbdc6fe106df7a Mon Sep 17 00:00:00 2001 From: Solarminer Date: Mon, 14 Sep 2020 12:54:50 -0500 Subject: [PATCH 5/8] Rewards Updates --- src/smartrewards/rewards.cpp | 6 +++--- src/smartrewards/rewardspayments.cpp | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index d969c879..1933cb1a 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -113,11 +113,11 @@ void CSmartRewards::UpdateRoundPayoutParameter() int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; if ( nPayeeCount ) { - if ( round->number > (nFirst_1_3_Round + 1) ) { + if ( round->number > (nFirst_1_3_Round + 3) ) { nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; - }else if ( round->number == (nFirst_1_3_Round + 1) ) { - nBlockPayees = 1000; + }else if ( round->number > nFirst_1_3_Round ) { + nBlockPayees = nPayeeCount; nBlockInterval = 1; }else if ( round->number == nFirst_1_3_Round ) { nBlockPayees = 0; diff --git a/src/smartrewards/rewardspayments.cpp b/src/smartrewards/rewardspayments.cpp index f0ec18dc..71554385 100644 --- a/src/smartrewards/rewardspayments.cpp +++ b/src/smartrewards/rewardspayments.cpp @@ -135,12 +135,15 @@ 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 == 1794799) { + smartReward = 264681480000000; + return SmartRewardPayments::Valid; + } if (nHeight == 1783799) { smartReward = 109307197536547; return SmartRewardPayments::Valid; } - LOCK(cs_rewardscache); SmartRewardPayments::Result result; From 68c523d21e08582c7be8235057fbe0957bc54d21 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Mon, 14 Sep 2020 14:20:10 -0500 Subject: [PATCH 6/8] Rewards Updates --- src/smartrewards/rewards.cpp | 4 ++-- src/smartrewards/rewardspayments.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 1933cb1a..87881f36 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -113,11 +113,11 @@ void CSmartRewards::UpdateRoundPayoutParameter() int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; if ( nPayeeCount ) { - if ( round->number > (nFirst_1_3_Round + 3) ) { + 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 = nPayeeCount; + nBlockPayees = 1000; nBlockInterval = 1; }else if ( round->number == nFirst_1_3_Round ) { nBlockPayees = 0; diff --git a/src/smartrewards/rewardspayments.cpp b/src/smartrewards/rewardspayments.cpp index 71554385..93695bf3 100644 --- a/src/smartrewards/rewardspayments.cpp +++ b/src/smartrewards/rewardspayments.cpp @@ -135,11 +135,15 @@ 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; } From fe113747bba2533f4bc473c4648fe37a8bdb9c39 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Mon, 14 Sep 2020 16:15:15 -0500 Subject: [PATCH 7/8] Rewards Fix --- src/smartrewards/rewards.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 87881f36..79d20401 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -121,7 +121,7 @@ void CSmartRewards::UpdateRoundPayoutParameter() nBlockInterval = 1; }else if ( round->number == nFirst_1_3_Round ) { nBlockPayees = 0; - nBlockInterval = 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; @@ -129,7 +129,7 @@ void CSmartRewards::UpdateRoundPayoutParameter() } else { // If there are no eligible smartreward entries nBlockPayees = 0; - nBlockInterval = 0; + nBlockInterval = 1; } cache.UpdateRoundPayoutParameter(nBlockPayees, nBlockInterval); From 87984a72b09efd61845edef2588e39c42f5b26c3 Mon Sep 17 00:00:00 2001 From: Solarminer Date: Tue, 15 Sep 2020 01:00:53 -0500 Subject: [PATCH 8/8] 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; }