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 1
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
- // Copyright (c) 2009-2022 The Bitcoin Core developers
2
+ // Copyright (c) 2009-present The Bitcoin Core developers
3
3
// Distributed under the MIT software license, see the accompanying
4
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
@@ -472,7 +472,8 @@ class NetinfoRequestHandler : public BaseRequestHandler
472
472
{
473
473
if (!args.empty ()) {
474
474
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;
476
477
m_details_level = std::min (n, NETINFO_MAX_LEVEL);
477
478
} else {
478
479
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