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

[wallet] Restore ability to list incoming transactions by label #14411

Merged
merged 2 commits into from Nov 14, 2018

Conversation

@ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented Oct 6, 2018

This change partially reverts #13075 and #14023.

Fixes #14382

@fanquake fanquake added the Wallet label Oct 6, 2018
@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Oct 6, 2018

Is this for backport to 0.17.1? While not necessary, I believe it would simplify upgrade from 0.17.1+ to 0.18.0, because 0.17.1 could be used without -deprecatedrpc as workaround.

@ryanofsky
Copy link
Contributor Author

@ryanofsky ryanofsky commented Oct 6, 2018

I think it'd be reasonable to backport this, since it's a small change that restores a removed feature. But I think it won't cherry-pick cleanly because #14023 was merged since the 0.17 branch. @Saicere originally reported the issue so they might be able to say whether there's a benefit to backporting.

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Oct 6, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14726 (Use RPCHelpMan for all RPCs by MarcoFalke)

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.

@Saicere
Copy link

@Saicere Saicere commented Oct 7, 2018

@Saicere originally reported the issue so they might be able to say whether there's a benefit to backporting.

As far as I am concerned, it's not really a big deal whether or not it's backported to the 0.17 branch as long as it's in before accounts are removed entirely. If you were using accounts in your application, you are probably running 0.17 with -deprecatedrpc=accounts anyway while RPC-facing code is updated.

@kristapsk
Copy link
Contributor

@kristapsk kristapsk commented Oct 7, 2018

ACK 8fcb765

Copy link
Member

@promag promag left a comment

Concept ACK.

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 8, 2018

Concept ACK. For completeness, this functionality was hidden behind a deprecation switch in #12953 (based on #11497). The functionality was marked deprecated in #5575.

Apologies - it was my oversight that this functionality got dropped. I'm happy to backport this to V0.17 once this gets merged. I aim to review this week.

Copy link
Member

@jnewbery jnewbery left a comment

Tested ACK 8fcb765 with a couple of nits.

@MarcoFalke - I'll go ahead and open a PR for backporting. A couple of questions:

  • does the backport need release notes?
  • if we add release notes for the backport, do we also need release notes here?

test/functional/wallet_listtransactions.py Outdated Show resolved Hide resolved
test/functional/wallet_listtransactions.py Outdated Show resolved Hide resolved
@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Oct 9, 2018

We assume the reader goes through the release notes for each release, so it should be sufficient to only mention on the 0.17. branch.

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 9, 2018

Backport is #14441. PR numbering was totally intentional.

Copy link
Contributor Author

@ryanofsky ryanofsky left a comment

Added 1 commit 8fcb765 -> 665d00f (pr/list-label.1 -> pr/list-label.2, compare) with suggested fixes.
Squashed 665d00f -> fa7fae5 (pr/list-label.2 -> pr/list-label.3)
Updated fa7fae5 -> 4deba4c (pr/list-label.3 -> pr/list-label.4) with release notes changes to reflect the intent to backport this to 0.17.1

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
test/functional/wallet_listtransactions.py Outdated Show resolved Hide resolved
test/functional/wallet_listtransactions.py Outdated Show resolved Hide resolved
@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 10, 2018

ACK 4deba4c

@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 10, 2018

The release note should be removed from this PR (assuming #14441 is merged)

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
@ryanofsky
Copy link
Contributor Author

@ryanofsky ryanofsky commented Oct 15, 2018

Updated 4deba4c -> 7cbe74f (pr/list-label.4 -> pr/list-label.5) removing release notes and changing whitespace as suggested.

@sipa
Copy link
Member

@sipa sipa commented Oct 15, 2018

Very nitty comment; it feels like this functionality is closer to listreceivedbylabel than to listtransactions (as the latter is about all transactions which affect the balance of the wallet - and formerly account) rather than just incoming payments. Would it make sense to add it as an extra option to listreceivedbylabel (verbose or so), or a separate RPC, instead?

@Saicere
Copy link

@Saicere Saicere commented Oct 15, 2018

Would it make sense to add it as an extra option to listreceivedbylabel (verbose or so), or a separate RPC, instead?

listreceivedbylabel doesn't take a label argument or list transactions in any way, it just lists total received coins per label, as per the code.

@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 16, 2018

ACK 7cbe74f. Only change since 4deba4c is removing release notes and changing whitespace.

@ryanofsky
Copy link
Contributor Author

@ryanofsky ryanofsky commented Oct 16, 2018

Would it make sense to add it as an extra option to listreceivedbylabel (verbose or so), or a separate RPC, instead?

It'd be good to improve listreceivedbylabel. But filtering by label in listtransactions used to work previously and I think was just removed by accident.

You could maybe say that listtransactions shouldn't return labels or filter by label at all, since outgoing transactions won't have labels. But I don't think it makes sense to keep returning labels and only remove the ability to filter them.

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Nov 12, 2018
@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Nov 12, 2018

Unless I am mistaken this has been "backported" in 5150acc. So this must go into 0.18.0 instead.
(assigned new milestone)

@@ -1352,10 +1356,12 @@ UniValue listtransactions(const JSONRPCRequest& request)

if (request.fHelp || request.params.size() > 4)
throw std::runtime_error(
"listtransactions (dummy count skip include_watchonly)\n"
"listtransactions ( label count skip include_watchonly )\n"
Copy link
Member

@MarcoFalke MarcoFalke Nov 13, 2018

From the documentation below, label is a string, so should be surrounded by quotation marks in the oneline doc.

Suggested change
"listtransactions ( label count skip include_watchonly )\n"
"listtransactions ( \"label\" count skip include_watchonly )\n"

Copy link
Contributor Author

@ryanofsky ryanofsky Nov 13, 2018

re: #14411 (comment)

From the documentation below, label is a string, so should be surrounded by quotation marks in the oneline doc.

Done in rebase.

@ryanofsky ryanofsky force-pushed the pr/list-label branch 3 times, most recently from ae81320 to da427db Nov 13, 2018
Copy link
Contributor Author

@ryanofsky ryanofsky left a comment

Rebased 671d8ee -> da427db (pr/list-label.6 -> pr/list-label.7) due to conflict with #14720

@@ -1352,10 +1356,12 @@ UniValue listtransactions(const JSONRPCRequest& request)

if (request.fHelp || request.params.size() > 4)
throw std::runtime_error(
"listtransactions (dummy count skip include_watchonly)\n"
"listtransactions ( label count skip include_watchonly )\n"
Copy link
Contributor Author

@ryanofsky ryanofsky Nov 13, 2018

re: #14411 (comment)

From the documentation below, label is a string, so should be surrounded by quotation marks in the oneline doc.

Done in rebase.

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Nov 14, 2018

ACK da427db (Only checked that the rebase was done properly from the last time people reviewed this. Also checked that the tests are the same as in the backport 5150acc, didn't look at the code)

@MarcoFalke MarcoFalke merged commit da427db into bitcoin:master Nov 14, 2018
2 checks passed
MarcoFalke added a commit that referenced this issue Nov 14, 2018
…by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts #13075 and #14023.

  Fixes #14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
@jnewbery
Copy link
Member

@jnewbery jnewbery commented Nov 21, 2018

utACK da427db

HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this issue Nov 26, 2018
Suggested by MeshCollider <dobsonsa68@gmail.com> in
bitcoin#14411 (comment)
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Mar 18, 2020
…by label

Summary:
da427dbd48 Rename ListTransactions filter variable (Russell Yanofsky)
65b740f92b [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts #13075 and #14023.

  Fixes #14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30

Backport of Core [[bitcoin/bitcoin#14411 | PR14411]]

Addresses concern raised #354

Test Plan:
  ninja check
  ninja check-functional
  ./bitcoind
  ./bitcoin-cli help listtransactions
Verify changes to help text.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5507
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue May 19, 2020
…by label

Summary:
da427dbd48 Rename ListTransactions filter variable (Russell Yanofsky)
65b740f92b [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts #13075 and #14023.

  Fixes #14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30

Backport of Core [[bitcoin/bitcoin#14411 | PR14411]]

Addresses concern raised Bitcoin-ABC#354

Test Plan:
  ninja check
  ninja check-functional
  ./bitcoind
  ./bitcoin-cli help listtransactions
Verify changes to help text.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5507
xdustinface added a commit to xdustinface/dash that referenced this issue Dec 22, 2020
… incoming transactions by label

89306ab [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  Backport of PR bitcoin#14411 to v0.17.

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 1f8300e1a79e826cd706561265b8788deef505fa510be1a76ed9a62e5fca37cf6a741423ac0e5de2a36d6e8b9f25f141885455aacacbbf6474814e6eae406a27
xdustinface added a commit to xdustinface/dash that referenced this issue Dec 22, 2020
… incoming transactions by label

89306ab [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  Backport of PR bitcoin#14411 to v0.17.

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 1f8300e1a79e826cd706561265b8788deef505fa510be1a76ed9a62e5fca37cf6a741423ac0e5de2a36d6e8b9f25f141885455aacacbbf6474814e6eae406a27
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Aug 7, 2021
…ctions by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Sep 17, 2021
…ctions by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
UdjinM6 added a commit to dashpay/dash that referenced this issue Sep 24, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Oct 12, 2021
…ctions by label

da427db Rename ListTransactions filter variable (Russell Yanofsky)
65b740f [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts bitcoin#13075 and bitcoin#14023.

  Fixes bitcoin#14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants