mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03: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:
parent
e208fb5d3b
commit
24bc46c83b
1 changed files with 6 additions and 0 deletions
|
@ -770,6 +770,12 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
|
|||
|
||||
// Use the valid port provided
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue