diff options
author | Jon Atack <jon@atack.com> | 2021-03-01 21:35:28 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-03-16 19:52:31 +0100 |
commit | 6423c8175fad3163c10ffdb49e0df48e4e4931f1 (patch) | |
tree | fe0ad5daa524b4802c6e2d60bcb80043d245d876 /src/bitcoin-cli.cpp | |
parent | 1b6c463e033f861561d1a46ccf7eec069bbac09f (diff) |
p2p, refactor: pass and use uint16_t CService::port as uint16_t
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r-- | src/bitcoin-cli.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index dc4b142f83..05e1fcae71 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -618,9 +618,9 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co // 1. -rpcport // 2. port in -rpcconnect (ie following : in ipv4 or ]: in ipv6) // 3. default port for chain - int port = BaseParams().RPCPort(); + uint16_t port{BaseParams().RPCPort()}; SplitHostPort(gArgs.GetArg("-rpcconnect", DEFAULT_RPCCONNECT), port, host); - port = gArgs.GetArg("-rpcport", port); + port = static_cast<uint16_t>(gArgs.GetArg("-rpcport", port)); // Obtain event base raii_event_base base = obtain_event_base(); |