Skip to content

Commit

Permalink
Registry: Remove realm from zone list with data
Browse files Browse the repository at this point in the history
Realm will not have actual registry record data but will act as a
seeder for both validator and flash zones.
  • Loading branch information
Muhammed Kadir Yücel authored and omerfirmak committed May 6, 2022
1 parent c584089 commit dc79da4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions source/agora/node/Registry.d
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ public class NameRegistry: NameRegistryAPI
/// Indexes for `zones`
private enum ZoneIndex
{
Realm = 0,
Validator = 1,
Flash = 2,
Validator = 0,
Flash = 1,
}

/// Zones of the registry
Expand Down Expand Up @@ -125,8 +124,6 @@ public class NameRegistry: NameRegistryAPI
this.flash = Domain.fromSafeString("flash." ~ realm.toString());

this.zones = [
ZoneData("realm", this.realm,
this.config.realm, cache_db, log, taskman, network),
ZoneData("validator", this.validators,
this.config.validators, cache_db, log, taskman, network),
ZoneData("flash", this.flash,
Expand Down Expand Up @@ -475,6 +472,11 @@ public class NameRegistry: NameRegistryAPI
auto findZone (Domain name, bool matches = true) @safe
{
mixin(TracyZoneLogger!("ctx", "reg_findZone"));

// TODO will enable this after seeding is implemented
// if (this.realm == name && matches)
// return &this.seed_...;

foreach (i, const ref zone; this.zones)
if (zone.root == name)
return matches ?
Expand Down

0 comments on commit dc79da4

Please sign in to comment.