mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 5d83e7d714 into merged_master (Bitcoin PR bitcoin/bitcoin#21090)
We comment out a newly-added assert from the Bitcoin side, because it's unclear how to replicate it correctly in Elements. Co-authored-by: Glenn Willen <gwillen@nerdnet.org>
This commit is contained in:
commit
17e6efe7fe
9 changed files with 121 additions and 139 deletions
|
|
@ -688,11 +688,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue