Client/voting: improve how it checks voting rights
This MR adds a new RPC to check whether a delegate is in the voting listing or not /chains/<chain_id>/blocks/<block>/context/delegates/<delegate_pkh>/voting_info
. Then, this MR changes how tezos-client
checks voting right: instead of downloading the full listings it now query the node with the new RPC.
Manually testing the MR
dune exec tezt/tests/main.exe -- --color --verbose --file voting.ml
Checklist
- N/A Document the interface of any function added or modified (see the coding guidelines)
- N/A Document any change to the user interface, including configuration parameters (see node configuration)
-
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else).
Edited by G.-B. Fefe