diff options
author | Dhruv Mehta <856960+dhruv@users.noreply.github.com> | 2021-02-05 12:17:41 -0800 |
---|---|---|
committer | Dhruv Mehta <856960+dhruv@users.noreply.github.com> | 2021-07-07 22:13:01 -0700 |
commit | 6f8b198b8256a6703a6f5e592dfa77fa024a7035 (patch) | |
tree | e52bf52b7087a7e1b6467c39af485a0b7aa4ecda /src/chainparams.cpp | |
parent | eba5b1cd6460c98e75d0422bd394e12af7f11e4c (diff) | |
download | bitcoin-6f8b198b8256a6703a6f5e592dfa77fa024a7035.tar.xz |
[p2p] remove unused segwitheight=-1 option
This also lets us default to NODE_WITNESS in nLocalServices
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r-- | src/chainparams.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 58a27e053b..815bc35113 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -490,11 +490,8 @@ void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args) { if (args.IsArgSet("-segwitheight")) { int64_t height = args.GetArg("-segwitheight", consensus.SegwitHeight); - if (height < -1 || height >= std::numeric_limits<int>::max()) { - throw std::runtime_error(strprintf("Activation height %ld for segwit is out of valid range. Use -1 to disable segwit.", height)); - } else if (height == -1) { - LogPrintf("Segwit disabled for testing\n"); - height = std::numeric_limits<int>::max(); + if (height < 0 || height >= std::numeric_limits<int>::max()) { + throw std::runtime_error(strprintf("Activation height %ld for segwit is out of valid range.", height)); } consensus.SegwitHeight = static_cast<int>(height); } |