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

[RPC] Add query options to listunspent rpc call. #2317

Merged
merged 4 commits into from
May 17, 2021

Conversation

furszy
Copy link

@furszy furszy commented Apr 15, 2021

Adaptation of bitcoin#8952

This PR adds a new optional JSON options for listunspent RPC call:

  • Return unspents greater or equal than a specific amount in PIV: minimumAmount.
  • Return unspents lower or equal than a specific amount in PIV: maximumAmount.
  • Return unspents with a total number lower or equal than a specific number: maximumCount.
  • Return unspents which total is greater or equal than a specific amount in PIV: minimumSumAmount.
> pivx-cli help listunspent
...
5. query options    (json, optional) JSON with query options
    {
      "minimumAmount"    (numeric or string, default=0) Minimum value of each UTXO in PIV
      "maximumAmount"    (numeric or string, default=unlimited) Maximum value of each UTXO in PIV
      "maximumCount"     (numeric or string, default=0=unlimited) Maximum number of UTXOs
      "minimumSumAmount" (numeric or string, default=unlimited) Minimum sum value all UTXOs in PIV
    }
...

@furszy furszy self-assigned this Apr 15, 2021
@furszy furszy force-pushed the 2021_listunspent_query_options branch from 1203cf5 to a8ba35f Compare April 15, 2021 18:50
@furszy furszy changed the title [RPC] Add query options to listunspent rpc call. [WIP] [RPC] Add query options to listunspent rpc call. Apr 16, 2021
@furszy furszy added this to the 6.0.0 milestone Apr 16, 2021
@furszy furszy changed the title [WIP] [RPC] Add query options to listunspent rpc call. [RPC] Add query options to listunspent rpc call. May 5, 2021
random-zebra
random-zebra previously approved these changes May 7, 2021
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

Tested ACK.
I've added functional testing and release-notes here. Feel free to pick if you want.

@furszy
Copy link
Author

furszy commented May 7, 2021

nice zebra ☕ , functional test + doc commits merged 👌.
Plus rebased on master due conflicts in the release-notes.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK 063abcf

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 063abcf

@furszy furszy merged commit e3d0c23 into PIVX-Project:master May 17, 2021
@furszy furszy deleted the 2021_listunspent_query_options branch November 29, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants