Skip to content
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

Merged
merged 3 commits into from
Jan 30, 2019
Merged

Add getspecialtxes rpc #2668

merged 3 commits into from
Jan 30, 2019

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jan 30, 2019

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.

Returns an array of special transactions found in the specified block
@UdjinM6 UdjinM6 added this to the 14.0 milestone Jan 30, 2019
"\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"

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.

Copy link
Author

@UdjinM6 UdjinM6 Jan 30, 2019

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.

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 :)

codablock
codablock previously approved these changes Jan 30, 2019
Copy link

@codablock codablock left a 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"

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 :)

src/rpc/blockchain.cpp Show resolved Hide resolved
src/rpc/blockchain.cpp Show resolved Hide resolved
src/rpc/blockchain.cpp Outdated Show resolved Hide resolved
Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK

Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK @ d92ce2b

@thephez
Copy link
Collaborator

thephez commented Jan 30, 2019

🤔 Just wondering if the next question is going to be - how do I getclassicaltxs? I don't think we have one of those.

@UdjinM6 UdjinM6 merged commit 5d1c97d into dashpay:develop Jan 30, 2019
codablock pushed a commit to codablock/dash that referenced this pull request Feb 6, 2019
* Add getspecialtxes rpc

Returns an array of special transactions found in the specified block

* small help text tweak

* add comments
@UdjinM6 UdjinM6 added the RPC Some notable changes to RPC params/behaviour/descriptions label Mar 5, 2019
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Jun 29, 2020
* Add getspecialtxes rpc

Returns an array of special transactions found in the specified block

* small help text tweak

* add comments
@UdjinM6 UdjinM6 deleted the getspecialtxes branch November 26, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants