mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 01:09:14 +01:00
[p2p] remove unused segwitheight=-1 option
This also lets us default to NODE_WITNESS in nLocalServices
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user