diff --git a/src/main.zig b/src/main.zig --- a/src/main.zig +++ b/src/main.zig @@ -119,9 +119,6 @@ // start: loads active hosts from DB, spawns subscriber threads try slurper.start(); - // pre-populate resolver queue with all known active DIDs - val.warmCache(&dp); - // start GC thread (runs every 10 minutes) const gc_thread = try std.Thread.spawn(.{}, gcLoop, .{&dp}); diff --git a/src/validator.zig b/src/validator.zig --- a/src/validator.zig +++ b/src/validator.zig @@ -8,7 +8,6 @@ const std = @import("std"); const zat = @import("zat"); const broadcaster = @import("broadcaster.zig"); -const event_log_mod = @import("event_log.zig"); const Allocator = std.mem.Allocator; const log = std.log.scoped(.relay); @@ -100,27 +99,6 @@ for (self.resolver_threads[0..count]) |*t| { t.* = try std.Thread.spawn(.{}, resolveLoop, .{self}); } - } - - /// pre-populate the resolve queue with all active DIDs from the database. - /// call after slurper.start() so subscribers are already running. - pub fn warmCache(self: *Validator, persist: *event_log_mod.DiskPersist) void { - var result = persist.db.query( - "SELECT did FROM account WHERE status = 'active' AND upstream_status = 'active' ORDER BY uid ASC", - .{}, - ) catch |err| { - log.warn("cache warming: query failed: {s}", .{@errorName(err)}); - return; - }; - defer result.deinit(); - - var count: u64 = 0; - while (result.nextUnsafe() catch null) |row| { - const did = row.get([]const u8, 0); - self.queueResolve(did); - count += 1; - } - log.info("cache warming: queued {d} DIDs for resolution", .{count}); } /// validate a #sync frame: signature verification only (no ops, no MST).