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

Fix issue with failing GetAddressGroupings with Private Spends #730

Merged
merged 3 commits into from
Oct 10, 2019

Conversation

riordant
Copy link
Contributor

@riordant riordant commented Oct 9, 2019

Fixes #723

PR intention

GetAddressGroupings() in wallet/wallet.cpp is causing a segfault if the wallet contains Zerocoin or Sigma spends. The issue is it expects each input of the transaction it's looking at to be associated with an address, spend inputs are not.

Code changes brief

Avoid the code block that deals with inputs entirely by checking if the overall tx is a spend. This is sufficient as spends cannot have non-spend inputs.

Copy link
Contributor

@thebevrishot thebevrishot left a comment

Choose a reason for hiding this comment

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

I think we could also prevent crashing because of reminting zerocoin to sigma too.

@riordant
Copy link
Contributor Author

@thebevrishot good catch. Updated

Copy link
Contributor

@thebevrishot thebevrishot left a comment

Choose a reason for hiding this comment

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

LGTM

@thebevrishot thebevrishot merged commit 8beeae2 into master Oct 10, 2019
@ultimaweapon ultimaweapon deleted the addressgrouping-fix branch October 15, 2019 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Listaddressgroupings crashes wallet
3 participants