Browse Source

Get rid of TestNet()

tags/v0.15.1
jtimon 6 years ago
parent
commit
a3d946ebdc
3 changed files with 2 additions and 7 deletions
  1. 1
    1
      src/bitcoin-cli.cpp
  2. 1
    1
      src/bitcoind.cpp
  3. 0
    5
      src/chainparams.h

+ 1
- 1
src/bitcoin-cli.cpp View File

@@ -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;

+ 1
- 1
src/bitcoind.cpp View File

@@ -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;

+ 0
- 5
src/chainparams.h View File

@@ -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

Loading…
Cancel
Save