mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
refactor: Avoid using IsArgSet() on -signetseednode and -signetchallenge list options
This commit does not change behavior because negation of -signetseednode and -signetchallenge parameters has been disallowed since these were introduced in #18267, so calling IsArgSet() is equivalent to checking if GetArgs() returns a non-empty list.
This commit is contained in:
parent
d05668922a
commit
3c2920ec98
1 changed files with 2 additions and 2 deletions
|
@ -25,10 +25,10 @@ using util::SplitString;
|
||||||
|
|
||||||
void ReadSigNetArgs(const ArgsManager& args, CChainParams::SigNetOptions& options)
|
void ReadSigNetArgs(const ArgsManager& args, CChainParams::SigNetOptions& options)
|
||||||
{
|
{
|
||||||
if (args.IsArgSet("-signetseednode")) {
|
if (!args.GetArgs("-signetseednode").empty()) {
|
||||||
options.seeds.emplace(args.GetArgs("-signetseednode"));
|
options.seeds.emplace(args.GetArgs("-signetseednode"));
|
||||||
}
|
}
|
||||||
if (args.IsArgSet("-signetchallenge")) {
|
if (!args.GetArgs("-signetchallenge").empty()) {
|
||||||
const auto signet_challenge = args.GetArgs("-signetchallenge");
|
const auto signet_challenge = args.GetArgs("-signetchallenge");
|
||||||
if (signet_challenge.size() != 1) {
|
if (signet_challenge.size() != 1) {
|
||||||
throw std::runtime_error("-signetchallenge cannot be multiple values.");
|
throw std::runtime_error("-signetchallenge cannot be multiple values.");
|
||||||
|
|
Loading…
Add table
Reference in a new issue