diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-03-25 20:11:40 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-03-25 20:11:47 +0100 |
commit | 2e97d8001705214b6b915b61a2c9c34832b85323 (patch) | |
tree | 96ebdf569fe04d9945475cbd04b84a115769c787 /src/rpc/net.cpp | |
parent | 7c942250264e75957d7737ff0d2f5c72e0e19a42 (diff) | |
parent | d056df033a1e88554f7cc39dd709a87b17cb49df (diff) |
Merge #18134: Replace std::to_string with locale-independent alternative
d056df033a1e88554f7cc39dd709a87b17cb49df Replace std::to_string with locale-independent alternative (Ben Woosley)
Pull request description:
Addresses #17866 following practicalswift's suggestion:
https://github.com/bitcoin/bitcoin/issues/17866#issuecomment-584287299
~Used ::ToString to avoid aliasing issues. Left uses in QT and test.~
ACKs for top commit:
practicalswift:
ACK d056df033a1e88554f7cc39dd709a87b17cb49df
laanwj:
ACK d056df033a1e88554f7cc39dd709a87b17cb49df
Tree-SHA512: 9e6966a9cdd14f4a1a40d9f0fa7c402aed22b2f1ad8681708e22b050d51a91c5d62220a9ec4c425be2d57acf5c964fca87a5e981b5cbff048bc3b6720dae92b7
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r-- | src/rpc/net.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index e26ca1b07a..caa62ca958 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -20,6 +20,7 @@ #include <sync.h> #include <timedata.h> #include <util/strencodings.h> +#include <util/string.h> #include <util/system.h> #include <validation.h> #include <version.h> @@ -712,7 +713,7 @@ static UniValue getnodeaddresses(const JSONRPCRequest& request) RPCHelpMan{"getnodeaddresses", "\nReturn known addresses which can potentially be used to find new nodes in the network\n", { - {"count", RPCArg::Type::NUM, /* default */ "1", "How many addresses to return. Limited to the smaller of " + std::to_string(ADDRMAN_GETADDR_MAX) + " or " + std::to_string(ADDRMAN_GETADDR_MAX_PCT) + "% of all known addresses."}, + {"count", RPCArg::Type::NUM, /* default */ "1", "How many addresses to return. Limited to the smaller of " + ToString(ADDRMAN_GETADDR_MAX) + " or " + ToString(ADDRMAN_GETADDR_MAX_PCT) + "% of all known addresses."}, }, RPCResult{ RPCResult::Type::ARR, "", "", |