Skip to content

Commit

Permalink
Protocol Enforcement Spork setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MNPJason committed Feb 25, 2019
1 parent 2c6097c commit 491a9eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6833,11 +6833,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// it was the one which was commented out
int ActiveProtocol()
{
if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
// if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
// return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;

if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;

// if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
// return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT;
}

Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ static const int INIT_PROTO_VERSION = 209;
static const int GETHEADERS_VERSION = 70000;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70010;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70030;
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70030;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70040;

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

0 comments on commit 491a9eb

Please sign in to comment.