Skip to content

Commit

Permalink
Fix blacklist vpermit_required (#1452)
Browse files Browse the repository at this point in the history
* - Adjusted blacklist argument default to False
- Tweaked description

* - Fix blacklist vpermit rejecting validators instead of non-validators

* - Blacklist vpermit return true without permit, return false with permit

* - Added text response to the return value for vpermit
  • Loading branch information
Inquinim authored and ifrit98 committed Aug 16, 2023
1 parent a6a89fd commit e80d3d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bittensor/_blacklist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def blacklist(
and is_registered
):
uid = metagraph.hotkeys.index(src_hotkey)
return metagraph.neurons[uid].validator_permit
# Return False (pass) if there is a permit, and True (fail) if there isn't.
if metagraph.neurons[uid].validator_permit:
return False, "has vpermit"
return True, "no vpermit"

# All checks passed.
return False, "passed blacklist"

0 comments on commit e80d3d5

Please sign in to comment.