From 95da89aaa7f9e6169cf6142af9038cc35591081a Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 6 Aug 2018 21:25:41 +0100 Subject: [PATCH] Softfork - Collateral increase at block 200,000 --- configure.ac | 4 ++-- src/main.cpp | 21 +++++---------------- src/masternode.h | 2 +- src/version.h | 12 +++++++----- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 4dd25a6..0aab202 100755 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) -define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_REVISION, 3) +define(_CLIENT_VERSION_MINOR, 1) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 1) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2018) diff --git a/src/main.cpp b/src/main.cpp index 0de38b2..a97f733 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -5345,23 +5345,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // it was the one which was commented out int ActiveProtocol() { - // SPORK_14 was used for 70910. Leave it 'ON' so they don't see > 70910 nodes. They won't react to SPORK_15 - // messages because it's not in their code -/* if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT)) - return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT; -*/ - - // SPORK_15 is used for 70911. Nodes < 70911 don't see it and still get their protocol version via SPORK_14 and their - // own ModifierUpgradeBlock() - - if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2)) - return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT; - - if (IsSporkActive(SPORK_17_NEW_PROTOCOL_ENFORCEMENT_3)) - return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT3; - - return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT; + if(chainActive.Height() >= SOFT_FORK_VERSION_110) + return MIN_PEER_PROTO_VERSION_COLLATERAL_UPGRADE; + + return MIN_PEER_PROTO_VERSION; + } // requires LOCK(cs_vRecvMsg) diff --git a/src/masternode.h b/src/masternode.h index 89fda1b..4d66224 100755 --- a/src/masternode.h +++ b/src/masternode.h @@ -22,7 +22,7 @@ #define MASTERNODE_REMOVAL_SECONDS (130 * 60) #define MASTERNODE_CHECK_SECONDS 5 -#define MASTERNODE_COLLATERAL 2500 +#define MASTERNODE_COLLATERAL 10000 using namespace std; diff --git a/src/version.h b/src/version.h index 43be66d..e5c7c55 100755 --- a/src/version.h +++ b/src/version.h @@ -11,7 +11,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70913; +static const int PROTOCOL_VERSION = 70914; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; @@ -19,10 +19,12 @@ static const int INIT_PROTO_VERSION = 209; //! In this version, 'getheaders' was introduced. static const int GETHEADERS_VERSION = 70077; -//! disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70911; -static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70912; -static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT3 = 70913; +//! disconnect from peers older than this proto version; +static const int MIN_PEER_PROTO_VERSION = 70913; +static const int MIN_PEER_PROTO_VERSION_COLLATERAL_UPGRADE = 70914; + +//! Soft fork blocks +static const int SOFT_FORK_VERSION_110 = 200000; //! nTime field added to CAddress, starting with this version; //! if possible, avoid requesting addresses nodes older than this