Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gittensor/validator/pat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ async def priority_pat_broadcast(validator: 'Validator', synapse: PatBroadcastSy
async def handle_pat_check(validator: 'Validator', synapse: PatCheckSynapse) -> PatCheckSynapse:
"""Check if the validator has the miner's PAT stored and re-validate it."""
hotkey = _get_hotkey(synapse)
if hotkey not in validator.metagraph.hotkeys:
synapse.has_pat = False
synapse.pat_valid = False
synapse.rejection_reason = 'Hotkey not registered on subnet'
return synapse
uid = validator.metagraph.hotkeys.index(hotkey)
entry = pat_storage.get_pat_by_uid(uid)

Expand Down
Loading