diff options
author | Matthew Zipkin <pinheadmz@gmail.com> | 2023-06-05 11:43:37 -0400 |
---|---|---|
committer | Matthew Zipkin <pinheadmz@gmail.com> | 2024-03-01 14:47:28 -0500 |
commit | ac2ecf3182fb5ad9bcd41540b19382376114d6ee (patch) | |
tree | 0ca8cf4f4e178ecfb3e2f52268848b78c3337799 /src | |
parent | a89c3f59dc44eaf4f59912c1accfc0ce5d61933a (diff) |
proxy: rename randomize_credentials to m_randomize_credentials
Diffstat (limited to 'src')
-rw-r--r-- | src/netbase.cpp | 2 | ||||
-rw-r--r-- | src/netbase.h | 8 | ||||
-rw-r--r-- | src/rpc/net.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index d3c3c36b37..c8735bd43d 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -665,7 +665,7 @@ std::unique_ptr<Sock> ConnectThroughProxy(const Proxy& proxy, } // do socks negotiation - if (proxy.randomize_credentials) { + if (proxy.m_randomize_credentials) { ProxyCredentials random_auth; static std::atomic_int counter(0); random_auth.username = random_auth.password = strprintf("%i", counter++); diff --git a/src/netbase.h b/src/netbase.h index e3b7da470c..0cefddafea 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -58,14 +58,14 @@ bool IsUnixSocketPath(const std::string& name); class Proxy { public: - Proxy(): m_is_unix_socket(false), randomize_credentials(false) {} - explicit Proxy(const CService &_proxy, bool _randomize_credentials=false): proxy(_proxy), m_is_unix_socket(false), randomize_credentials(_randomize_credentials) {} - explicit Proxy(const std::string path, bool _randomize_credentials=false): m_unix_socket_path(path), m_is_unix_socket(true), randomize_credentials(_randomize_credentials) {} + Proxy() : m_is_unix_socket(false), m_randomize_credentials(false) {} + explicit Proxy(const CService& _proxy, bool _randomize_credentials = false) : proxy(_proxy), m_is_unix_socket(false), m_randomize_credentials(_randomize_credentials) {} + explicit Proxy(const std::string path, bool _randomize_credentials = false) : m_unix_socket_path(path), m_is_unix_socket(true), m_randomize_credentials(_randomize_credentials) {} CService proxy; std::string m_unix_socket_path; bool m_is_unix_socket; - bool randomize_credentials; + bool m_randomize_credentials; bool IsValid() const { diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index be07e6c2d5..3fa2b18495 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -608,7 +608,7 @@ static UniValue GetNetworksInfo() obj.pushKV("limited", !g_reachable_nets.Contains(network)); obj.pushKV("reachable", g_reachable_nets.Contains(network)); obj.pushKV("proxy", proxy.IsValid() ? proxy.ToString() : std::string()); - obj.pushKV("proxy_randomize_credentials", proxy.randomize_credentials); + obj.pushKV("proxy_randomize_credentials", proxy.m_randomize_credentials); networks.push_back(obj); } return networks; |