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

Receive change in the first clean change address #4207

Merged
merged 1 commit into from Aug 19, 2020

Conversation

yahiheb
Copy link
Collaborator

@yahiheb yahiheb commented Aug 19, 2020

Fixes #4172

Currently when you make a transaction that generates change, the change goes to a random address from the list of clean change addresses. The standard behavior is to receive the change in the first clean change address.

Used FirstOrDefault() because RandomElement() returns default if there is no element. https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi/Extensions/LinqExtensions.cs#L44-L61

@nopara73 nopara73 merged commit 56c701f into zkSNACKs:master Aug 19, 2020
@yahiheb yahiheb deleted the 1st-clean-change-address branch August 19, 2020 17:59
Copy link
Member

@MaxHillebrand MaxHillebrand left a comment

Choose a reason for hiding this comment

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

late tACK

@yahiheb
Copy link
Collaborator Author

yahiheb commented Jul 25, 2021

@molnard @nopara73 This is not in the backport branch.
Maybe related to #6094

@molnard
Copy link
Collaborator

molnard commented Jul 27, 2021

@molnard @nopara73 This is not in the backport branch.
Maybe related to #6094

Yes, this is missing from the backport, good catch - adding it.

@molnard molnard added this to Triage in Backport v1.1.12.10 via automation Jul 27, 2021
@nopara73
Copy link
Contributor

I don't think it should be backported. I don't remember what was it exactly, but we relied on this behavior (and probably rely on it today with the backport?) as commented here: #4172 (comment)

@yahiheb
Copy link
Collaborator Author

yahiheb commented Jul 27, 2021

But this might be the source of the wrong balance at recovery issue #3552

@nopara73
Copy link
Contributor

Sure, but it also could be the source of something worse. But your call.

@molnard molnard moved this from Triage to Added in Backport v1.1.12.10 Oct 25, 2021
molnard added a commit to molnard/WalletWasabi that referenced this pull request Oct 25, 2021
@molnard molnard mentioned this pull request Oct 28, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Change received not in the expected keypath
4 participants