From a3d946ebdc2eebef9ccdc2c883f8abfebcf0f653 Mon Sep 17 00:00:00 2001 From: jtimon Date: Sat, 22 Mar 2014 20:22:14 +0100 Subject: [PATCH] Get rid of TestNet() --- src/bitcoin-cli.cpp | 2 +- src/bitcoind.cpp | 2 +- src/chainparams.h | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index ce9e7a4027f..29efdfa8216 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -33,7 +33,7 @@ static bool AppInitRPC(int argc, char* argv[]) fprintf(stderr,"Error reading configuration file: %s\n", e.what()); return false; } - // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause) + // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause) if (!SelectParamsFromCommandLine()) { fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n"); return false; diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 9b535c2e6b9..704332c39ba 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -77,7 +77,7 @@ bool AppInit(int argc, char* argv[]) fprintf(stderr,"Error reading configuration file: %s\n", e.what()); return false; } - // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause) + // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause) if (!SelectParamsFromCommandLine()) { fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n"); return false; diff --git a/src/chainparams.h b/src/chainparams.h index 3849d33aca6..653ca20f017 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -120,9 +120,4 @@ void SelectParams(CChainParams::Network network); */ bool SelectParamsFromCommandLine(); -inline bool TestNet() { - // Note: it's deliberate that this returns "false" for regression test mode. - return Params().NetworkID() == CChainParams::TESTNET; -} - #endif