mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 825f4a64e6 into merged_master (Bitcoin PR bitcoin/bitcoin#22976)
This commit is contained in:
commit
eea9829aa6
26 changed files with 93 additions and 93 deletions
|
|
@ -702,7 +702,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
|
|||
// 3. default port for chain
|
||||
uint16_t port{BaseParams().RPCPort()};
|
||||
SplitHostPort(gArgs.GetArg("-rpcconnect", DEFAULT_RPCCONNECT), port, host);
|
||||
port = static_cast<uint16_t>(gArgs.GetArg("-rpcport", port));
|
||||
port = static_cast<uint16_t>(gArgs.GetIntArg("-rpcport", port));
|
||||
|
||||
// Obtain event base
|
||||
raii_event_base base = obtain_event_base();
|
||||
|
|
@ -712,7 +712,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
|
|||
|
||||
// Set connection timeout
|
||||
{
|
||||
const int timeout = gArgs.GetArg("-rpcclienttimeout", DEFAULT_HTTP_CLIENT_TIMEOUT);
|
||||
const int timeout = gArgs.GetIntArg("-rpcclienttimeout", DEFAULT_HTTP_CLIENT_TIMEOUT);
|
||||
if (timeout > 0) {
|
||||
evhttp_connection_set_timeout(evcon.get(), timeout);
|
||||
} else {
|
||||
|
|
@ -822,7 +822,7 @@ static UniValue ConnectAndCallRPC(BaseRequestHandler* rh, const std::string& str
|
|||
UniValue response(UniValue::VOBJ);
|
||||
// Execute and handle connection failures with -rpcwait.
|
||||
const bool fWait = gArgs.GetBoolArg("-rpcwait", false);
|
||||
const int timeout = gArgs.GetArg("-rpcwaittimeout", DEFAULT_WAIT_CLIENT_TIMEOUT);
|
||||
const int timeout = gArgs.GetIntArg("-rpcwaittimeout", DEFAULT_WAIT_CLIENT_TIMEOUT);
|
||||
const auto deadline{GetTime<std::chrono::microseconds>() + 1s * timeout};
|
||||
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue