Skip to content

Commit

Permalink
Fix validator registration query (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsudmi authored Dec 29, 2021
1 parent ed2b01a commit ca8bb93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion operator_cli/eth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def generate_unused_validator_keys(
)
registrations = result["validatorRegistrations"]
for registration in registrations:
del pub_key_to_priv_key[registration["id"]]
del pub_key_to_priv_key[registration["publicKey"]]

bar.update(len(pub_key_to_priv_key) - curr_progress)

Expand Down
6 changes: 3 additions & 3 deletions operator_cli/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def get_stakewise_gql_client(chain: str) -> Client:

REGISTRATIONS_QUERY = gql(
"""
query getValidatorRegistrations($public_keys: [ID!]) {
query getValidatorRegistrations($public_keys: [Bytes!]) {
validatorRegistrations(
where: { id_in: $public_keys }
where: { publicKey_in: $public_keys }
) {
id
publicKey
}
}
"""
Expand Down

0 comments on commit ca8bb93

Please sign in to comment.