-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baking rights with priority 0 #174
Comments
This should be the case. I can write an integration test around this to verify/fix. |
@sebeec /baking_rights? rpc does not accept 'max_priority' as a parameter. You have to fetch all rights and filter manually. |
The Tezos node rpc accepts a parameter "max_priority": https://tezos.gitlab.io/007/rpc.html#get-block-id-helpers-baking-rights. When no parameter is provided then the max_priority is 64. If I only want to know priority 0 bakings, I will set this parameter to value '0'. When only querying 0 priority the RPC response is also much faster than querying all priorities up to 64. However, the tezos go library allows to set a max_priority, but not priority 0 due to a mistake in the programming. If max_priority parameter in tezos go library is set to 0, then the Tezos rpc node is called without a "max_priority" parameter and thus defaults to 64. |
@sebeec Interesting. A clear documentation issue as the CLI does not mention max_priority at all:
But it certainly does work:
|
Can't get baking rights with 0 priority only:
go-tezos/rpc/delegate.go
Line 518 in bdff4cf
if "b.MaxPriority == 0" then the parameter "max_priority=0" should be appended to the request /../baking_rights?"
The text was updated successfully, but these errors were encountered: