Skip to content

Commit

Permalink
Fix Flake
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Oct 12, 2023
1 parent 1de13ea commit 11c7bf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def on_post(self, req, resp, since_slot=None):
return

# I love type checking.
if type(validator_indices) != list or any(
type(x) != int for x in validator_indices
if type(validator_indices) is list or any(
type(x) is not int for x in validator_indices
):
resp.text = json.dumps({"error": "request must be a list of integers"})
resp.code = falcon.HTTP_400
Expand Down
4 changes: 2 additions & 2 deletions build_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def get_blocks_per_client(block_db, start_slot, end_slot):
def get_validator_blocks(block_db, validator_index, since_slot=None):
since_slot = since_slot or 0
rows = block_db.execute(
"""SELECT slot, best_guess_single, best_guess_multi, pr_grandine, pr_lighthouse, pr_lodestar,
pr_nimbus, pr_prysm, pr_teku
"""SELECT slot, best_guess_single, best_guess_multi, pr_grandine, pr_lighthouse,
pr_lodestar, pr_nimbus, pr_prysm, pr_teku
FROM blocks WHERE proposer_index = ? AND slot >= ?""",
(validator_index, since_slot),
)
Expand Down

0 comments on commit 11c7bf2

Please sign in to comment.