Skip to content

Optimizing `TracingAgent::start()`

Rodrigo Muino Tomonari requested to merge github/fork/lnpotter/patch-1 into main

I believe that the DispatchResponse TracingAgent::start() function can be improved to be more efficient and more readable for those who wish to contribute.

  1. Unified the two error checking conditions into one;
  2. Used the length() function to check whether at least one category has been enabled;
  3. Used the set initialization std::set to insert elements directly from an array;
  4. Unified the two null checks into one.

I believe that this way, it is easier to interpret what is happening in this snippet code and look for further improvements.

Merge request reports

Loading