-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add getspecialtxes rpc #2668
Add getspecialtxes rpc #2668
Conversation
Returns an array of special transactions found in the specified block
"\nArguments:\n" | ||
"1. \"blockhash\" (string, required) The block hash\n" | ||
"2. type (numeric, optional, default=-1) Filter special txes by type, -1 means all types\n" | ||
"3. count (numeric, optional, default=10) The number of transactions to return\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think I understand why you chose to have count
before skip
, but IMHO it would be more consistent the other way around with what people usually expect when dealing with pagination. They would usually expect the start/offset to come first and then have the count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just trying to make it close to already existing rpc e.g. listtransactions
assuming that it should cause less confusion. I think the reason it was implemented this way is because you'd normally just want like 10 first txes or 20 or whatever, so you just specify one param and only if you start using it like real pagination you'd need to specify the second one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, didn't know that this was already turned around in other RPCs. Yeah, then it's better to stay consistent with ourself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
"\nArguments:\n" | ||
"1. \"blockhash\" (string, required) The block hash\n" | ||
"2. type (numeric, optional, default=-1) Filter special txes by type, -1 means all types\n" | ||
"3. count (numeric, optional, default=10) The number of transactions to return\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, didn't know that this was already turned around in other RPCs. Yeah, then it's better to stay consistent with ourself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK @ d92ce2b
🤔 Just wondering if the next question is going to be - how do I |
* Add getspecialtxes rpc Returns an array of special transactions found in the specified block * small help text tweak * add comments
* Add getspecialtxes rpc Returns an array of special transactions found in the specified block * small help text tweak * add comments
Returns an array of special transactions found in the specified block. Can be filtered by special transaction types, has simple pagination support and provides different verbosity levels.