Skip to content

Conversation

@luke-jr
Copy link
Member

@luke-jr luke-jr commented Feb 22, 2020

These functions are used to mark/check if a key of our own has been used to spend (and only for avoid-reuse wallets), which has nothing to do with the destination/address itself.
Give them more accurate names to avoid confusion.

-BEGIN VERIFY SCRIPT-
sed -i -e 's/UsedDestination/SpentKey/g' $(git grep -l 'UsedDestination' ./src)
-END VERIFY SCRIPT-

These functions are used to mark/check if a key of our own has been used to spend (and only for avoid-reuse wallets), which has nothing to do with the destination/address itself.
Give them more accurate names to avoid confusion.

-BEGIN VERIFY SCRIPT-
sed -i -e 's/UsedDestination/SpentKey/g' $(git grep -l 'UsedDestination' ./src)
-END VERIFY SCRIPT-
@luke-jr luke-jr requested a review from kallewoof February 22, 2020 05:11
@za-kk
Copy link
Contributor

za-kk commented Feb 22, 2020

Concept ACK. This was something that caused confusion with myself (see #17355)

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

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

ACK bca8665

This is something that bothered me as well, even though I was the one who wrote it.

@practicalswift
Copy link
Contributor

ACK bca8665 -- patch looks correct and rationale makes sense

@instagibbs
Copy link
Member

ACK bca8665, much more meaningful name, thanks

@instagibbs
Copy link
Member

FWIW: originally it was destination-based, but that was a privacy leak

@maflcko maflcko merged commit 225aa5d into bitcoin:master Feb 24, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 24, 2020
…*UsedDestination

bca8665 scripted-diff: Wallet: Rename incorrectly named *UsedDestination (Luke Dashjr)

Pull request description:

  These functions are used to mark/check if a key of our own has been used to spend (and only for avoid-reuse wallets), which has nothing to do with the destination/address itself.
  Give them more accurate names to avoid confusion.

  -BEGIN VERIFY SCRIPT-
  sed -i -e 's/UsedDestination/SpentKey/g' $(git grep -l 'UsedDestination' ./src)
  -END VERIFY SCRIPT-

ACKs for top commit:
  practicalswift:
    ACK bca8665 -- patch looks correct and rationale makes sense
  instagibbs:
    ACK bitcoin@bca8665, much more meaningful name, thanks
  kallewoof:
    ACK bca8665

Tree-SHA512: ff13d9061ffa748e92eb41ba962c3ec262a43e4b6abd62408b38c6f650395d6ae5851554257d1900fb02767a88d08380d592a27210192ee9abb72d0945976686
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
…*UsedDestination

bca8665 scripted-diff: Wallet: Rename incorrectly named *UsedDestination (Luke Dashjr)

Pull request description:

  These functions are used to mark/check if a key of our own has been used to spend (and only for avoid-reuse wallets), which has nothing to do with the destination/address itself.
  Give them more accurate names to avoid confusion.

  -BEGIN VERIFY SCRIPT-
  sed -i -e 's/UsedDestination/SpentKey/g' $(git grep -l 'UsedDestination' ./src)
  -END VERIFY SCRIPT-

ACKs for top commit:
  practicalswift:
    ACK bca8665 -- patch looks correct and rationale makes sense
  instagibbs:
    ACK bitcoin@bca8665, much more meaningful name, thanks
  kallewoof:
    ACK bca8665

Tree-SHA512: ff13d9061ffa748e92eb41ba962c3ec262a43e4b6abd62408b38c6f650395d6ae5851554257d1900fb02767a88d08380d592a27210192ee9abb72d0945976686
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 3, 2021
Summary:
> These functions are used to mark/check if a key of our own has been used to spend (and only for avoid-reuse wallets), which has nothing to do with the destination/address itself.
> Give them more accurate names to avoid confusion.
>
> -BEGIN VERIFY SCRIPT-
> sed -i -e 's/UsedDestination/SpentKey/g' $(git grep -l 'UsedDestination' ./src)
> -END VERIFY SCRIPT-

This is a backport of Core [[bitcoin/bitcoin#18193 | PR18193]]

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8767
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants