Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
Merge Wallet
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Boards
Labels
Milestones
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Merge
Merge Wallet
Commits
a989d473
Commit
a989d473
authored
Jul 31, 2020
by
barrystyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick hack to allow separation of mainnet/testnet clients by version too
parent
e0b84744
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/main.cpp
src/main.cpp
+8
-0
No files found.
src/main.cpp
View file @
a989d473
...
...
@@ -5467,6 +5467,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
return
true
;
}
bool
IsTestnet
()
{
return
Params
().
NetworkID
()
==
CBaseChainParams
::
TESTNET
;
}
// Note: whenever a protocol update is needed toggle between both implementations (comment out the formerly active one)
// so we can leave the existing clients untouched (old SPORK will stay on so they don't see even older clients).
// Those old clients won't react to the changes of the other (new) SPORK because at the time of their implementation
...
...
@@ -5476,6 +5481,9 @@ int ActiveProtocol()
// 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
(
IsTestnet
())
return
70914
;
if
(
IsSporkActive
(
SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2
))
return
MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT
;
return
MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment