mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 06:04:42 +02:00
chainparams: make deployment configuration available on all test networks
This allows unit tests to set `-testactivationheight` and `-vbparams` on all networks instead of exclusively on regtest. Those are kept test-network-only when used as startup parameters.
This commit is contained in:
10
src/init.cpp
10
src/init.cpp
@@ -1125,6 +1125,16 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent setting deployment parameters on mainnet.
|
||||
if (chainparams.GetChainType() == ChainType::MAIN) {
|
||||
if (args.IsArgSet("-testactivationheight")) {
|
||||
return InitError(_("The -testactivationheight option may not be used on mainnet."));
|
||||
}
|
||||
if (args.IsArgSet("-vbparams")) {
|
||||
return InitError(_("The -vbparams option may not be used on mainnet."));
|
||||
}
|
||||
}
|
||||
|
||||
// Also report errors from parsing before daemonization
|
||||
{
|
||||
kernel::Notifications notifications{};
|
||||
|
||||
Reference in New Issue
Block a user