Merge 62d137ac3b into merged_master (Bitcoin PR #19561)

This commit is contained in:
Andrew Poelstra 2020-11-26 22:20:40 +00:00
commit 2942044881
11 changed files with 291 additions and 286 deletions

View file

@ -411,8 +411,8 @@ public:
void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args)
{
if (gArgs.IsArgSet("-segwitheight")) {
int64_t height = gArgs.GetArg("-segwitheight", consensus.SegwitHeight);
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) {