mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
cli: Add warning for duplicate port definition
Adds a warning when both -rpcconnect and -rpcport define a port to be used.
This commit is contained in:
@@ -770,6 +770,12 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
|
|||||||
|
|
||||||
// Use the valid port provided
|
// Use the valid port provided
|
||||||
port = rpcport_int;
|
port = rpcport_int;
|
||||||
|
|
||||||
|
// If there was a valid port provided in rpcconnect,
|
||||||
|
// rpcconnect_port is non-zero.
|
||||||
|
if (rpcconnect_port != 0) {
|
||||||
|
tfm::format(std::cerr, "Warning: Port specified in both -rpcconnect and -rpcport. Using -rpcport %u\n", port);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user