Skip to content

Add getspecialtxes rpc#2668

Merged
UdjinM6 merged 3 commits into
dashpay:developfrom
UdjinM6:getspecialtxes
Jan 30, 2019
Merged

Add getspecialtxes rpc#2668
UdjinM6 merged 3 commits into
dashpay:developfrom
UdjinM6:getspecialtxes

Conversation

@UdjinM6
Copy link
Copy Markdown

@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
Comment thread src/rpc/blockchain.cpp
"\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"
Copy link
Copy Markdown

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
Copy Markdown
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.

Copy link
Copy Markdown

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
Copy Markdown

@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

Comment thread src/rpc/blockchain.cpp
"\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"
Copy link
Copy Markdown

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

Comment thread src/rpc/blockchain.cpp
Comment thread src/rpc/blockchain.cpp
Comment thread src/rpc/blockchain.cpp Outdated
Comment thread src/rpc/blockchain.cpp
Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown
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.

4 participants