Skip to content

Commit 9a7ec20

Browse files
committed
v10.2.0 Hardfork @ block 951753
1 parent 367437d commit 9a7ec20

File tree

6 files changed

+37
-11
lines changed

6 files changed

+37
-11
lines changed

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 10)
5-
define(_CLIENT_VERSION_REVISION, 1)
5+
define(_CLIENT_VERSION_REVISION, 2)
66
define(_CLIENT_VERSION_BUILD, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
8-
define(_COPYRIGHT_YEAR, 2015)
8+
define(_COPYRIGHT_YEAR, 2020)
99
AC_INIT([Dobbscoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[[email protected]],[dobbscoin])
1010
AC_CONFIG_SRCDIR([src/main.cpp])
1111
AC_CONFIG_HEADERS([src/config/dobbscoin-config.h])

src/amount.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@ typedef int64_t CAmount;
1616
static const CAmount COIN = 100000000;
1717
static const CAmount CENT = 1000000;
1818

19-
/** No amount larger than this (in satoshi) is valid */
20-
static const CAmount MAX_MONEY = 21000000 * COIN;
19+
/** No amount larger than this (in satoshi) is valid.
20+
*
21+
* Note that this constant is *not* the total money supply, which in Bitcoin
22+
* currently happens to be less than 21,000,000 BTC for various reasons, but
23+
* rather a sanity check. As this sanity check is used by consensus-critical
24+
* validation code, the exact value of the MAX_MONEY constant is consensus
25+
* critical; in unusual circumstances like a(nother) overflow bug that allowed
26+
* for the creation of coins out of thin air modification could lead to a fork.
27+
* */
28+
static const CAmount MAX_MONEY = 10000000000 * COIN;
2129
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
2230

2331
/** Type-safe wrapper class to for fee rates

src/clientversion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* for both dobbscoind and dobbscoin-core, to make it harder for attackers to
1414
* target servers or GUI users specifically.
1515
*/
16-
const std::string CLIENT_NAME("Satoshi");
16+
const std::string CLIENT_NAME("EndTimes");
1717

1818
/**
1919
* Client version number

src/clientversion.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! These need to be macros, as clientversion.cpp's and dobbscoin*-res.rc's voodoo requires it
1717
#define CLIENT_VERSION_MAJOR 0
1818
#define CLIENT_VERSION_MINOR 10
19-
#define CLIENT_VERSION_REVISION 1
19+
#define CLIENT_VERSION_REVISION 2
2020
#define CLIENT_VERSION_BUILD 0
2121

2222
//! Set to true for release, false for prerelease or test build
@@ -26,7 +26,7 @@
2626
* Copyright year (2009-this)
2727
* Todo: update this when changing our copyright comments in the source
2828
*/
29-
#define COPYRIGHT_YEAR 2015
29+
#define COPYRIGHT_YEAR 2020
3030

3131
#endif //HAVE_CONFIG_H
3232

src/main.cpp

+19-2
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,9 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
12741274
return true;
12751275
}
12761276

1277+
static const int64_t nBlockRewardMinimumCoin = 0.5 * COIN;
1278+
static const int64_t nBlockRewardEndCoin = 1.5 * COIN;
1279+
12771280
CAmount GetBlockValue(int nHeight, const CAmount& nFees)
12781281
{
12791282
CAmount nSubsidy = 50 * COIN;
@@ -1295,9 +1298,23 @@ CAmount GetBlockValue(int nHeight, const CAmount& nFees)
12951298
{
12961299
nSubsidy=10*COIN;
12971300
}
1298-
// Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
1299-
nSubsidy >>= (nHeight / 210000);
13001301

1302+
//Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
1303+
//! Require block 951750 or lower to consider halved blocks relevant.
1304+
if(!Params().AllowMinDifficultyBlocks() && nHeight<=951752)
1305+
{
1306+
nSubsidy >>= (nHeight / 210000);
1307+
}
1308+
1309+
//!Hardset the 'hardfork' point at this point we'll only make blocks of 1.5 coins.
1310+
if(!Params().AllowMinDifficultyBlocks() && nHeight>=951753)
1311+
{
1312+
nSubsidy=1.5*COIN;
1313+
}
1314+
1315+
//!Double check, will force 1.5 as of 10500000 as a failsafe.
1316+
if (nSubsidy <= nBlockRewardMinimumCoin) {nSubsidy = nBlockRewardEndCoin;}
1317+
13011318
return nSubsidy + nFees;
13021319
}
13031320

src/version.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
* network protocol versioning
1010
*/
1111

12-
static const int PROTOCOL_VERSION = 70003;
12+
//! When X-Day arrives, don't allow pinks on the pleasure saucers.
13+
static const int PROTOCOL_VERSION = 70005;
1314

1415
//! initial proto version, to be increased after version/verack negotiation
1516
static const int INIT_PROTO_VERSION = 209;
@@ -18,7 +19,7 @@ static const int INIT_PROTO_VERSION = 209;
1819
static const int GETHEADERS_VERSION = 31800;
1920

2021
//! disconnect from peers older than this proto version
21-
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
22+
static const int MIN_PEER_PROTO_VERSION = PROTOCOL_VERSION;
2223

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

0 commit comments

Comments
 (0)