0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/console: Show number of keys in event_horizon when no event_id given.

This commit is contained in:
Jason Volk 2019-05-16 23:27:31 -07:00
parent 20d3fe1072
commit ff61342c01

View file

@ -6438,11 +6438,22 @@ console_cmd__event__horizon(opt &out, const string_view &line)
"event_id",
}};
const m::event::id &event_id
const string_view &event_id
{
param.at("event_id")
param["event_id"]
};
if(!event_id)
{
const auto &num_keys
{
db::property<db::prop_int>(m::dbs::event_horizon, "rocksdb.estimate-num-keys")
};
out << "Estimated event_id's unresolved: " << num_keys << '.' << std::endl;
return true;
}
char buf[m::dbs::EVENT_HORIZON_KEY_MAX_SIZE];
const string_view &key
{