0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 03:13:47 +02:00

ircd:Ⓜ️ Add event horizon data in pretty_detailed(event) output.

This commit is contained in:
Jason Volk 2023-02-04 12:02:33 -08:00
parent 8bdb266149
commit 32140fedf3

View file

@ -82,6 +82,13 @@ ircd::m::pretty_detailed(std::ostream &out,
<< refs.count()
<< std::endl;
const m::event::horizon horizon{event.event_id};
if(horizon.count())
out
<< std::setw(16) << std::right << "HORIZONS" << " "
<< horizon.count()
<< std::endl;
out << std::endl;
for(size_t i(0); i < auth.auth_events_count(); ++i)
{
@ -121,6 +128,28 @@ ircd::m::pretty_detailed(std::ostream &out,
<< std::endl;
}
horizon.for_each([&out]
(const auto &, const auto &event_idx)
{
const m::event::fetch event
{
std::nothrow, event_idx
};
out
<< "<-- HORIZON "
<< " " << std::setw(9) << std::right << event.event_idx
<< " ";
if(event.valid)
out << pretty_oneline(event, false);
else
out << "Not Found.";
out << std::endl;
return true;
});
if(event_idx)
out
<< std::setw(16) << std::left << "---"