1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

add ShortHex function to AlignedBuffer

This commit is contained in:
Thomas Winget 2020-02-29 21:15:25 -05:00
parent 341d03bcf8
commit 68c1ae52b3
2 changed files with 7 additions and 1 deletions

View file

@ -13,7 +13,7 @@ namespace tooling
std::string PubIntroReceivedEvent::ToString() const
{
return RouterEvent::ToString() + "from " + From.ToHex() + " location=" + IntrosetLocation.ToHex() + " order=" + std::to_string(RelayOrder) + " txid=" + std::to_string(TxID);
return RouterEvent::ToString() + "from " + From.ShortHex() + " location=" + IntrosetLocation.ShortHex() + " order=" + std::to_string(RelayOrder) + " txid=" + std::to_string(TxID);
}
}

View file

@ -259,6 +259,12 @@ namespace llarp
return std::string(HexEncode(*this, strbuf));
}
std::string
ShortHex() const
{
return ToHex().substr(0, 8);
}
std::ostream&
print(std::ostream& stream, int level, int spaces) const
{