Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Jul 23, 2020

Cleaning a duplicate watch only filtering configuration from CWallet::AvailableCoins. The same configuration can be found in CCoinControl object, fAllowWatchOnly member.

It has mostly non-functional changes and only duplicated code cleanup. The only functional change exception is in listunspent rpc command.
listunspent command will not be able anymore to retrieve only the watch only utxo. watch only utxo can be added or not to the utxo set with a custom configuration (same as before).

@furszy furszy force-pushed the 2020_remove_nWatchOnlyConfig branch from 9d4429e to c5a5af4 Compare July 23, 2020 15:30
@Fuzzbawls Fuzzbawls changed the title AvailableCoins: remove duplicated watchonly config argument. [Wallet] AvailableCoins remove duplicated watchonly config argument. Jul 26, 2020
@Fuzzbawls Fuzzbawls added this to the 5.0.0 milestone Jul 26, 2020
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.

Looking good. Thinking that the RPC argument watchonlyconfig might make more sense as a boolean now.
Though this would require a small change in wallet_basic.py too (which, I believe, is the only place testing the fourth argument of listunspent).

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.

utACK c5a5af4

@furszy furszy requested a review from Fuzzbawls August 4, 2020 03:37
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.

utACK c5a5af4

@furszy furszy merged commit dcc92f8 into PIVX-Project:master Aug 8, 2020
furszy added a commit that referenced this pull request Aug 18, 2020
a13c245 AvailableCoins: remove unused "includeZeroValue" flag. (furszy)
e74dcd8 AvailableCoins: improving core readability. (furszy)

Pull request description:

  Built on top of #1759 .

  Improved code readability of the `CWallet::AvailableCoins` method decoupling nested statements and adding comments in between the checks.
  Plus, removed an unused "add zero value utxo" flag.

  An ugly area of the code could get pretty readable with some love.
  #1757 is going further on this area with some more improvements.

ACKs for top commit:
  random-zebra:
    utACK a13c245
  Fuzzbawls:
    utACK a13c245

Tree-SHA512: 1a5cb1eb058505d66b9a18de60ded211b248568150506e3b7ef32a5b3a8a818055ea85d321caa0c709ee7951dab12bf3450f057edadbf530e9514342194e55f8
@random-zebra random-zebra modified the milestones: 5.0.0, 4.3.0 Sep 10, 2020
@furszy furszy deleted the 2020_remove_nWatchOnlyConfig branch November 29, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants