diff --git a/api_server.py b/api_server.py index 8295c40..2d9ba21 100644 --- a/api_server.py +++ b/api_server.py @@ -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 diff --git a/build_db.py b/build_db.py index be7965e..0726bc9 100755 --- a/build_db.py +++ b/build_db.py @@ -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), )