LCOV - code coverage report
Current view: top level - src/node - peerman_args.cpp (source / functions) Coverage Total Hit
Test: test_bitcoin_coverage.info Lines: 77.8 % 9 7
Test Date: 2024-08-28 04:44:32 Functions: 100.0 % 1 1
Branches: 45.8 % 24 11

             Branch data     Line data    Source code
       1                 :             : #include <node/peerman_args.h>
       2                 :             : 
       3                 :             : #include <common/args.h>
       4                 :             : #include <net_processing.h>
       5                 :             : 
       6                 :             : #include <algorithm>
       7                 :             : #include <limits>
       8                 :             : 
       9                 :             : namespace node {
      10                 :             : 
      11                 :         162 : void ApplyArgsManOptions(const ArgsManager& argsman, PeerManager::Options& options)
      12                 :             : {
      13   [ +  -  -  + ]:         324 :     if (auto value{argsman.GetBoolArg("-txreconciliation")}) options.reconcile_txs = *value;
      14                 :             : 
      15   [ +  -  -  + ]:         324 :     if (auto value{argsman.GetIntArg("-maxorphantx")}) {
      16         [ #  # ]:           0 :         options.max_orphan_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
      17                 :             :     }
      18                 :             : 
      19   [ +  -  -  + ]:         324 :     if (auto value{argsman.GetIntArg("-blockreconstructionextratxn")}) {
      20         [ #  # ]:           0 :         options.max_extra_txs = uint32_t((std::clamp<int64_t>(*value, 0, std::numeric_limits<uint32_t>::max())));
      21                 :             :     }
      22                 :             : 
      23   [ +  -  +  + ]:         324 :     if (auto value{argsman.GetBoolArg("-capturemessages")}) options.capture_messages = *value;
      24                 :             : 
      25   [ +  -  -  + ]:         324 :     if (auto value{argsman.GetBoolArg("-blocksonly")}) options.ignore_incoming_txs = *value;
      26                 :         162 : }
      27                 :             : 
      28                 :             : } // namespace node
      29                 :             : 
        

Generated by: LCOV version 2.0-1