mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-09 13:10:25 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
30 lines
828 B
C++
30 lines
828 B
C++
#include <path/path.hpp>
|
|
#include "common.hpp"
|
|
|
|
namespace llarp
|
|
{
|
|
namespace path
|
|
{
|
|
void
|
|
PathHopConfig_Init(py::module& mod)
|
|
{
|
|
auto str_func = [](PathHopConfig* hop) {
|
|
std::string s = "Hop: [";
|
|
s += RouterID(hop->rc.pubkey).ShortString();
|
|
s += "] -> [";
|
|
s += hop->upstream.ShortString();
|
|
s += "]";
|
|
return s;
|
|
};
|
|
py::class_<PathHopConfig>(mod, "PathHopConfig")
|
|
.def_readonly("rc", &PathHopConfig::rc)
|
|
.def_readonly("upstreamRouter", &PathHopConfig::upstream)
|
|
.def_readonly("txid", &PathHopConfig::txID)
|
|
.def_readonly("rxid", &PathHopConfig::rxID)
|
|
.def("ToString", str_func)
|
|
.def("__str__", str_func)
|
|
.def("__repr__", str_func);
|
|
}
|
|
} // namespace path
|
|
} // namespace llarp
|