This commit is contained in:
Brad Miller
2018-03-07 09:33:55 -07:00
parent 99d9e1483f
commit e882e3c06f
2 changed files with 24 additions and 1 deletions

View File

@@ -8,10 +8,16 @@
#include "init.h"
#include "ui_interface.h"
#include "util.h"
#include "chainparams.h"
static const std::string CLIENT_VERSION_STR = FormatVersion(CLIENT_VERSION);
void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
// Do not enforce deprecation in regtest or on testnet
std::string networkID = Params().NetworkIDString();
if (networkID != "main") return;
int blocksToDeprecation = DEPRECATION_HEIGHT - nHeight;
bool disableDeprecation = (GetArg("-disabledeprecation", "") == CLIENT_VERSION_STR);
if (blocksToDeprecation <= 0) {