From b597348e88bd535d4edc31f57f12f19a0ac1e15e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Jun 2014 00:46:26 -0400 Subject: [PATCH 1/5] max coins changed to 63 million; permanent block reward reduction to 10 added in place of previous block reward halving scheme; PROTOCOL_VERSION and MIN_PEER_PROTO_VERSION incremented forward by 1 to facilitate hardfork; client version number incremented to 1.3.0 --- src/clientversion.h | 2 +- src/main.cpp | 8 ++++++-- src/main.h | 2 +- src/version.h | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/clientversion.h b/src/clientversion.h index 343c8a1..6b23a4c 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -7,7 +7,7 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 -#define CLIENT_VERSION_MINOR 2 +#define CLIENT_VERSION_MINOR 3 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 diff --git a/src/main.cpp b/src/main.cpp index fbdd8b8..86d7eeb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1108,8 +1108,12 @@ int64 static GetBlockValue(int nHeight, int64 nFees) nSubsidy = 45 * COIN; } - // Subsidy is cut in half every 3153600 blocks, which will occur approximately every 3 years - nSubsidy >>= (nHeight / 3153600); + // Permantently reduce the number of mined coins to 10 after block 620000 + if(nHeight > 620000){ + nSubsidy = 10 * COIN; + } + + return nSubsidy + nFees; } diff --git a/src/main.h b/src/main.h index bd00c7a..72c320b 100644 --- a/src/main.h +++ b/src/main.h @@ -54,7 +54,7 @@ static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 CSC /** Dust Hard Limit, ignored as wallet inputs (mininput default) */ static const int64 DUST_HARD_LIMIT = 1000; // 0.00001 CSC mininput /** No amount larger than this (in satoshi) is valid */ -static const int64 MAX_MONEY = 336000000 * COIN; +static const int64 MAX_MONEY = 63000000 * COIN; inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int COINBASE_MATURITY = 8; diff --git a/src/version.h b/src/version.h index b8c900f..3e7f918 100644 --- a/src/version.h +++ b/src/version.h @@ -31,7 +31,7 @@ static const int PROTOCOL_VERSION = 70003; static const int INIT_PROTO_VERSION = 209; // disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION = 70003; // TODO: Change to 70003 before block 445000 to force new client downloading and therefore doing the actual hard fork +static const int MIN_PEER_PROTO_VERSION = 70004; // TODO: Change to 70003 before block 445000 to force new client downloading and therefore doing the actual hard fork // nTime field added to CAddress, starting with this version; // if possible, avoid requesting addresses nodes older than this From 37e00791b2075bc2d9b762d919fb2df027b925e8 Mon Sep 17 00:00:00 2001 From: qwerty55 Date: Tue, 10 Jun 2014 01:04:58 -0400 Subject: [PATCH 2/5] incremented PROTOCOL_VERSION to 70004; missed this in last push --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 3e7f918..b79a82b 100644 --- a/src/version.h +++ b/src/version.h @@ -25,7 +25,7 @@ extern const std::string CLIENT_DATE; // network protocol versioning // -static const int PROTOCOL_VERSION = 70003; +static const int PROTOCOL_VERSION = 70004; // intial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; From c53af9e5534859c385f4d33510ed305f3b4f33ce Mon Sep 17 00:00:00 2001 From: qwerty55 Date: Tue, 10 Jun 2014 02:59:27 -0400 Subject: [PATCH 3/5] changed version to 1.3.0.0 in casinocoin-qt.pro --- casinocoin-qt.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casinocoin-qt.pro b/casinocoin-qt.pro index f69cb36..09f31d4 100644 --- a/casinocoin-qt.pro +++ b/casinocoin-qt.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = casinocoin-qt macx:TARGET = "CasinoCoin-Qt" -VERSION = 1.2.0.0 +VERSION = 1.3.0.0 INCLUDEPATH += src src/json src/qt QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets From f4d665abec0d620a23de510788029a6cbac0b45f Mon Sep 17 00:00:00 2001 From: qwerty55 Date: Tue, 10 Jun 2014 03:02:57 -0400 Subject: [PATCH 4/5] updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f6da46..8769fba 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

Please download the updated wallet asap, hard fork incoming at block 445000

-[Click here to download the most recent wallet version -> 1.2.0 (Updated on May, 19, 2014)](https://github.com/casinocoin/casinocoin/releases/tag/1.2.0.0 "Click to go to releases page") +[Click here to download the most recent wallet version -> 1.3.0 (Updated on July, 4 2014)](https://github.com/casinocoin/casinocoin/releases/tag/1.3.0.0 "Click to go to releases page")

From 2ff46aa40bb5b85e1717bac6b782bf7efbb76325 Mon Sep 17 00:00:00 2001 From: qwerty55 Date: Wed, 11 Jun 2014 04:13:32 -0400 Subject: [PATCH 5/5] added upper boundary to block reward reduction to ensure 63 million coins maximum --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 86d7eeb..eedd055 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1110,7 +1110,13 @@ int64 static GetBlockValue(int nHeight, int64 nFees) // Permantently reduce the number of mined coins to 10 after block 620000 if(nHeight > 620000){ - nSubsidy = 10 * COIN; + if(nHeight < 3756000){ + nSubsidy = 10 * COIN; + } + else + { + nSubsidy = 0 * COIN; + } }