From 7faa249162a19e3bc1d09e797afa03b8dfea5176 Mon Sep 17 00:00:00 2001 From: gilesb Date: Fri, 9 Jan 2026 03:43:06 +0000 Subject: [PATCH] Add pending_anchors count to anchor stats Co-Authored-By: Claude Opus 4.5 --- db.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db.py b/db.py index cce736a..68bd742 100644 --- a/db.py +++ b/db.py @@ -689,6 +689,9 @@ async def get_anchor_stats() -> dict: confirmed_anchors = await conn.fetchval( "SELECT COUNT(*) FROM anchors WHERE confirmed_at IS NOT NULL" ) + pending_anchors = await conn.fetchval( + "SELECT COUNT(*) FROM anchors WHERE confirmed_at IS NULL" + ) anchored_activities = await conn.fetchval( "SELECT COUNT(*) FROM activities WHERE anchor_root IS NOT NULL" ) @@ -698,6 +701,7 @@ async def get_anchor_stats() -> dict: return { "total_anchors": total_anchors, "confirmed_anchors": confirmed_anchors, + "pending_anchors": pending_anchors, "anchored_activities": anchored_activities, "unanchored_activities": unanchored_activities }