add ShortHex function to AlignedBuffer

pull/1184/head
Thomas Winget 4 years ago
parent 341d03bcf8
commit 68c1ae52b3

@ -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);
}
}

@ -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
{

Loading…
Cancel
Save