Skip to content

Commit

Permalink
Disallow connection for blacklisted validator
Browse files Browse the repository at this point in the history
  • Loading branch information
mzukowski-reef committed Oct 8, 2024
1 parent d7046ee commit 5c9a0ba
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ async def connect(self):
):
msg = f"Inactive validator: {self.validator_key}"
fail = True
validator_blacklisted = await ValidatorBlacklist.objects.filter(
validator=self.validator
).aexists()
if validator_blacklisted:
msg = f"Blacklisted validator: {self.validator_key}"
fail = True
if fail:
await self.send(miner_requests.GenericError(details=msg).model_dump_json())
logger.info(msg)
Expand Down

0 comments on commit 5c9a0ba

Please sign in to comment.