aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/api.rs')
-rw-r--r--src/remake/api.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/remake/api.rs b/src/remake/api.rs
index 1da0539..a767706 100644
--- a/src/remake/api.rs
+++ b/src/remake/api.rs
@@ -881,9 +881,14 @@ pub(crate) async fn strict_manifest<H: Host>(
/// `GET /admin/epochs`: the local epoch, the previous epochs this node still keeps, and
/// an ongoing catch-up with a peer's newer epoch (`null` if none).
pub(crate) async fn epochs<H: Host>(State(host): State<H>) -> Response {
- let current = EpochRecord::from(host.current_epoch());
+ let epoch = host.current_epoch();
+ let current = EpochRecord::from(epoch);
+ let root = host
+ .read_doc(move |doc| crate::swarm::roots::of(doc, epoch).map(|root| root.to_string()))
+ .await;
Json(json!({
"current": current,
+ "root": root,
"archived": host.remake().archived_epochs(),
"catchUp": host.remake().catch_up_report(),
"quarantine": host.remake().list_quarantine(|entry| entry.id.clone()),