Move prefixes table maintenance from DBHandler to PrefixHandler

- DBHandler now only maintains asns and asn_peerings tables
- PrefixHandler maintains both prefixes and live_routes tables
- This consolidates all prefix-related operations in one handler
This commit is contained in:
2025-07-28 02:16:12 +02:00
parent 8b43882526
commit eaa11b5f8d
2 changed files with 32 additions and 74 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ func (h *PrefixHandler) flushBatchLocked() {
// Apply updates to database
for _, update := range prefixMap {
// Get or create prefix
// Get or create prefix (this maintains the prefixes table)
prefix, err := h.db.GetOrCreatePrefix(update.prefix, update.timestamp)
if err != nil {
h.logger.Error("Failed to get/create prefix",