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.
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.
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.
Ah ok, didn't know that this was already turned around in other RPCs. Yeah, then it's better to stay consistent with ourself :)
| "\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.
Ah ok, didn't know that this was already turned around in other RPCs. Yeah, then it's better to stay consistent with ourself :)
|
🤔 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.