Skip to content

Commit b5b2b79

Browse files
committed
last issue
1 parent 83521ac commit b5b2b79

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

subvortex/core/metagraph/metagraph.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ async def start(self):
7070
)
7171

7272
# Detect if any neuron IP has changed
73-
has_axons_changed, new_axons = (
74-
await self._has_neuron_ip_changed(axons)
75-
if axons
76-
else (False, {})
77-
)
73+
has_axons_changed, new_axons = await self._has_neuron_ip_changed(axons)
7874

7975
# Determine whether a resync is needed
8076
time_to_resync = block - last_synced_block >= sync_interval
@@ -111,8 +107,14 @@ async def start(self):
111107

112108
# Sync from chain and update Redis
113109
axons, has_missing_country = await self._resync()
110+
111+
# Store the sync block
114112
last_synced_block = block
113+
114+
# Notify listener the metagraph is ready
115115
ready = await self._notify_if_needed(ready)
116+
117+
# Store the new axons
116118
axons = new_axons
117119

118120
except Exception as e:
@@ -352,9 +354,6 @@ async def _has_new_neuron_registered(self, registration_count) -> tuple[bool, in
352354
async def _has_neuron_ip_changed(
353355
self, axons: dict[str, str]
354356
) -> tuple[bool, dict[str, str]]:
355-
if not axons:
356-
return False, {}
357-
358357
latest_axons = await scbs.get_axons(
359358
subtensor=self.subtensor,
360359
netuid=self.settings.netuid,
@@ -377,12 +376,8 @@ async def _has_neuron_ip_changed(
377376
f"📈 {len(changed_axons)} neurons with changed IPs: {list(changed_axons.keys())}",
378377
prefix=self.settings.logging_name,
379378
)
380-
return True, changed_axons
379+
return True, latest_axons
381380

382-
btul.logging.debug(
383-
"✅ No IP changes detected among tracked axons",
384-
prefix=self.settings.logging_name,
385-
)
386381
return False, latest_axons
387382

388383
def _get_details_changed(self, new_neuron, current_neuron):

subvortex/validator/neuron/src/weights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def should_set_weights(
3535
min_stake: int,
3636
):
3737
if settings.dry_run:
38-
return
38+
return False
3939

4040
has_enough_stake = neuron.stake >= min_stake
4141
if has_enough_stake == False:

0 commit comments

Comments
 (0)