Skip to content

Commit

Permalink
Merge pull request #88 from SmartCash/master
Browse files Browse the repository at this point in the history
1.3.3 Version
  • Loading branch information
thesolarminer authored Sep 15, 2020
2 parents fbde34c + 87984a7 commit 91e6091
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 45 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
11 changes: 6 additions & 5 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
};
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
3 changes: 3 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -488,6 +489,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-maxreceivebuffer=<n>", strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER));
strUsage += HelpMessageOpt("-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, <n>*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=<n>", strprintf(_("Minimimum protocol <n> to connect (default: %u)"), MIN_PEER_PROTO_VERSION));
strUsage += HelpMessageOpt("-onion=<ip:port>", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy"));
strUsage += HelpMessageOpt("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG));
Expand Down Expand Up @@ -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);
Expand Down
35 changes: 3 additions & 32 deletions src/smartrewards/rewards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,42 +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 ( round->number < nFirst_1_3_Round ) {
if ( round->number < (nFirst_1_3_Round + 3) ) {
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<int>(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;
}

} else {
// If there are no eligible smartreward entries
nBlockPayees = 0;
nBlockInterval = 0;
}

cache.UpdateRoundPayoutParameter(nBlockPayees, nBlockInterval);
Expand Down
1 change: 0 additions & 1 deletion src/smartrewards/rewardspayments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ SmartRewardPayments::Result SmartRewardPayments::Validate(const CBlock& block, i
return SmartRewardPayments::Valid;
}


LOCK(cs_rewardscache);

SmartRewardPayments::Result result;
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> 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<std::string> 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<string, string> mapArgs;
map<string, vector<string> > mapMultiArgs;
Expand Down

0 comments on commit 91e6091

Please sign in to comment.