From 2c4af77f5f7231b560c344ccaff3cc73f0d616e9 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sun, 4 May 2025 00:39:13 +0200 Subject: Refactor lookup init and add routing table metric I think it would be nice to see the detailed routing table occupancy. I've added a metric that exposes the current occupancy of each bucket. That should provide me some insight into the current distribution of nodes and if we need to find a way to keep the closer buckets alive. --- src/proto.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/proto.h') diff --git a/src/proto.h b/src/proto.h index 0e1bcbc..328c9ca 100644 --- a/src/proto.h +++ b/src/proto.h @@ -21,7 +21,15 @@ struct tokens { size_t head; }; +enum Operation { + OP_EMPTY, + OP_PENDING, + OP_ACTIVE, + OP_COMPLETED, +}; + struct lookup { + enum Operation state; struct nodeid target; struct nodeid closest[8]; -- cgit v1.2.3