[go: up one dir, main page]

Confusing meaning of (in)active argument in `delegates` RPC

Currently one can pass two arguments to the ../<block>/context/delegates RPC: active and inactive. The default behavior, when no argument is given, is to list all delegates. This means that when the RPC flags active and inactive are both false, then all delegates are listed. This is, let's say, ok. However, this means that when calling ../<block>/context/delegates?active=false we still list all delegates, which is not intuitive.

By the way, the meaning of these arguments is not explained in the RPC's description.

A final, third point is the following inconsistency:

I think having both arguments is not needed if we keep the current default behavior: when no argument is given, list all delegates, then I think the argument active should be enough:

  • to list only the active delegates, use delegates?active (or delegates?active=true)
  • to list only the inactive delegates, use delegates?active=false

If the default behavior is changed to only show the active delegates when no argument is given, then I think indeed two arguments are needed.

Edited by Eugen Zalinescu