mirror of https://github.com/oxen-io/lokinet
Use ToString over ToHex
This commit is contained in:
parent
afb94381a2
commit
777261cb20
|
@ -30,7 +30,7 @@ namespace llarp
|
|||
util::StatusObject obj{};
|
||||
for(const auto& item : nodes)
|
||||
{
|
||||
obj[item.first.ToHex()] = item.second.ExtractStatus();
|
||||
obj[item.first.ToString()] = item.second.ExtractStatus();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,12 @@ namespace llarp
|
|||
return rid.ToString();
|
||||
}
|
||||
|
||||
std::string
|
||||
ToString() const
|
||||
{
|
||||
return SNode();
|
||||
}
|
||||
|
||||
Key_t
|
||||
operator^(const Key_t& other) const
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace llarp
|
|||
ExtractStatus() const
|
||||
{
|
||||
util::StatusObject obj{{"whoasked", whoasked.ExtractStatus()},
|
||||
{"target", target.ToHex()}};
|
||||
{"target", target.ToString()}};
|
||||
std::vector< util::StatusObject > foundObjs;
|
||||
std::transform(valuesFound.begin(), valuesFound.end(),
|
||||
std::back_inserter(foundObjs),
|
||||
|
@ -54,7 +54,7 @@ namespace llarp
|
|||
std::vector< std::string > asked;
|
||||
std::transform(
|
||||
peersAsked.begin(), peersAsked.end(), std::back_inserter(asked),
|
||||
[](const auto& item) -> std::string { return item.ToHex(); });
|
||||
[](const auto& item) -> std::string { return item.ToString(); });
|
||||
obj["asked"] = asked;
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -45,14 +45,14 @@ namespace llarp
|
|||
timeouts.begin(), timeouts.end(), std::back_inserter(timeoutsObjs),
|
||||
[](const auto& item) -> util::StatusObject {
|
||||
return util::StatusObject{{"time", item.second},
|
||||
{"target", item.first.ToHex()}};
|
||||
{"target", item.first.ToString()}};
|
||||
});
|
||||
obj["timeouts"] = timeoutsObjs;
|
||||
std::transform(waiting.begin(), waiting.end(),
|
||||
std::back_inserter(waitingObjs),
|
||||
[](const auto& item) -> util::StatusObject {
|
||||
return util::StatusObject{
|
||||
{"target", item.first.ToHex()},
|
||||
{"target", item.first.ToString()},
|
||||
{"whoasked", item.second.ExtractStatus()}};
|
||||
});
|
||||
obj["waiting"] = waitingObjs;
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace llarp
|
|||
util::StatusObject obj{{"lastUpdated", last_updated},
|
||||
{"exit", IsExit()},
|
||||
{"publicRouter", IsPublicRouter()},
|
||||
{"identity", pubkey.ToHex()}};
|
||||
{"identity", pubkey.ToString()}};
|
||||
if(HasNick())
|
||||
obj["nickname"] = Nick();
|
||||
return obj;
|
||||
|
|
Loading…
Reference in New Issue