File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) 2009-2010 Satoshi Nakamoto
2- // Copyright (c) 2009-2022 The Bitcoin Core developers
2+ // Copyright (c) 2009-present The Bitcoin Core developers
33// Distributed under the MIT software license, see the accompanying
44// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
@@ -472,7 +472,8 @@ class NetinfoRequestHandler : public BaseRequestHandler
472472 {
473473 if (!args.empty ()) {
474474 uint8_t n{0 };
475- if (ParseUInt8 (args.at (0 ), &n)) {
475+ if (const auto res{ToIntegral<uint8_t >(args.at (0 ))}) {
476+ n = *res;
476477 m_details_level = std::min (n, NETINFO_MAX_LEVEL);
477478 } else {
478479 throw std::runtime_error (strprintf (" invalid -netinfo level argument: %s\n For more information, run: bitcoin-cli -netinfo help" , args.at (0 )));
You can’t perform that action at this time.
0 commit comments