Skip to content

Commit

Permalink
Reward Cleanup / Spork Time Set
Browse files Browse the repository at this point in the history
* Reward Cleanup / Spork Time Set

* Proto / Version Bump
  • Loading branch information
MotoAcidic committed Oct 7, 2018
1 parent c4844a6 commit 1099096
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -157,3 +157,4 @@ config.status
.vs/CCBC/v15/ipch/AutoPCH/fb4db16ec65083b9/OVERVIEWPAGE.ipch
.vs/config/applicationhost.config
.vs/CCBC/v15/ipch/AutoPCH/3e4badd4568fd837/NET.ipch
.vs/CCBC/v15/ipch/AutoPCH/afae31017abe89a9/CLIENTVERSION.ipch
3 changes: 2 additions & 1 deletion configure.ac
Expand Up @@ -3,7 +3,8 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_BUILD, 4)

define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Ccbc Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[www.ccbcoin.club],[ccbc])
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -18,7 +18,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 3
#define CLIENT_VERSION_BUILD 4

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
21 changes: 8 additions & 13 deletions src/main.cpp
Expand Up @@ -2119,21 +2119,19 @@ int64_t GetBlockValue(int nHeight)
if (nHeight <= 200 && nHeight > 0)
return 250000 * COIN;
}

if (IsTreasuryBlock(nHeight)) {
LogPrintf("GetBlockValue(): this is a treasury block\n");
nSubsidy = GetTreasuryAward(nHeight);
}
else if (IsReviveBlock(nHeight)) {
LogPrintf("GetBlockValue(): this is a revive block\n");
nSubsidy = GetReviveAward(nHeight);
else if (IsReviveBlock(nHeight)) {
LogPrintf("GetBlockValue(): this is a revive block\n");
nSubsidy = GetReviveAward(nHeight);
}

}
else {
if (nHeight == 0) {
nSubsidy = 1600000 * COIN;
} else if (nHeight <= 5 && nHeight > 1) { //First POW phase
} else if (nHeight <= 5 && nHeight > 1) { //First POW phase
nSubsidy = 1600000 * COIN;
} else if (nHeight <= 200 && nHeight > 1) { //First POW phase
nSubsidy = 0 * COIN;
Expand All @@ -2156,19 +2154,16 @@ int64_t GetBlockValue(int nHeight)
} else if (nHeight <= 556800) { //Till max supply Total coins used 17,882,000
nSubsidy = 5 * COIN; //57,026.38 days will max supply is reached
}
int64_t nMoneySupply = chainActive.Tip()->nMoneySupply;

if (nMoneySupply + nSubsidy >= Params().MaxMoneyOut())
int64_t nMoneySupply = chainActive.Tip()->nMoneySupply;
if (nMoneySupply + nSubsidy >= Params().MaxMoneyOut())
nSubsidy = Params().MaxMoneyOut() - nMoneySupply;

if (nMoneySupply >= Params().MaxMoneyOut())
nSubsidy = 0; //Needs to be 0 at the end
nSubsidy = 0; //Amount each block pays after max supply is reached
}
return nSubsidy;
}



CAmount GetSeeSaw(const CAmount& blockValue, int nMasternodeCount, int nHeight)
{
//if a mn count is inserted into the function we are looking for a specific result for a masternode count
Expand Down
26 changes: 13 additions & 13 deletions src/spork.h
Expand Up @@ -45,20 +45,20 @@ using namespace boost;
#define SPORK_17_TREASURY_PAYMENT_ENFORCEMENT 10016
#define SPORK_18_REVIVE_PAYMENT_ENFORCEMENT 10017

#define SPORK_2_SWIFTTX_DEFAULT 978307200 //2001-1-1
#define SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT 1424217600 //2015-2-18
#define SPORK_2_SWIFTTX_DEFAULT 978307200 //ON 01/01/2001 @ 12:00am (UTC)
#define SPORK_3_SWIFTTX_BLOCK_FILTERING_DEFAULT 1424217600 //ON 02/18/2015 @ 12:00am (UTC)
#define SPORK_5_MAX_VALUE_DEFAULT 1000 //1000 CCBC
#define SPORK_7_MASTERNODE_SCANNING_DEFAULT 978307200 //2001-1-1
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT 4070908800 //OFF
#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF - NOTE: this is block height not time!
#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT 4070908800 //OFF
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF
#define SPORK_16_ZEROCOIN_MAINTENANCE_MODE_DEFAULT 4070908800 //OFF
#define SPORK_17_TREASURY_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //ON
#define SPORK_18_REVIVE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //ON
#define SPORK_7_MASTERNODE_SCANNING_DEFAULT 978307200 //ON 01/01/2001 @ 12:00am (UTC)
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_16_ZEROCOIN_MAINTENANCE_MODE_DEFAULT 4070908800 //OFF 01/01/2099 @ 12:00am (UTC)
#define SPORK_17_TREASURY_PAYMENT_ENFORCEMENT_DEFAULT 1540256400 //ON 10/23/2018 @ 1:00am (UTC)
#define SPORK_18_REVIVE_PAYMENT_ENFORCEMENT_DEFAULT 1540256400 //ON 10/23/2018 @ 1:00am (UTC)

class CSporkMessage;
class CSporkManager;
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Expand Up @@ -12,7 +12,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 70003;
static const int PROTOCOL_VERSION = 70004;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand All @@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70000;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70002;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70003;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70004;

//! nTime field added to CAddress, starting with this version;
//! if possible, avoid requesting addresses nodes older than this
Expand Down

0 comments on commit 1099096

Please sign in to comment.