Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
rpc: Consistent range arguments in scantxoutset/importmulti/deriveaddresses #15497
This introduces a consistent notation for RPC arguments in
I suggest this as an alternative to #15496, which only makes
I realize this is technically a feature added to
referenced this pull request
Feb 27, 2019
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
promag left a comment
Looks good, concept ACK, especially for keeping it compatible.
The object notation is more verbose, like named arguments, it increases readability.
Named arguments are useful when there is potential confusion about what the arguments mean, or when there's need for future expansibility. Range notation is kind of self-evident and it's entirely sure that no new fields will be introduced.
So I tend to disagree here. A tuple
I realize it's needed for backward compat, but specifying a range by giving one number seems kind of counter intuitive. Esp since by looking at the param, you can't really tell if the one number is supposed to be the start or end of the range (so there's a 50% chance of guessing wrong). Maybe the
@Sjors interesting, the 0-based part I got right away, but I guess it depends what programming lang you usually work with :-)
What I just find ambiguous is that
ofc when you read the documentation, you know that option 1 is the correct one. But as a casual user it's quite easy to make mistakes, since