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

Fixed the unspent index for remints of 50 XZC #714

Merged
merged 3 commits into from
Oct 8, 2019
Merged

Conversation

a-bezrukov
Copy link
Contributor

PR intention

Fixes an issue with calculating balance of remint transactions in case of 50XZC remints, which produced 2 outputs of 25 XZC Sigma mints.

Code changes brief

Now all remint outputs are summed up and used as the amount for the input.

@a-bezrukov a-bezrukov self-assigned this Oct 2, 2019
@reubenyap reubenyap added the bug label Oct 2, 2019
psolstice
psolstice previously approved these changes Oct 2, 2019
Copy link
Contributor

@psolstice psolstice left a comment

Choose a reason for hiding this comment

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

LGTM

src/txdb.cpp Outdated
error("A Zerocoin to Sigma remint tx shoud have just 1 input");
return;
}
handleRemint(tx.vin[0], 0, tx.GetHash(), height, txNumber, remintValue, addressIndex, addressUnspentIndex, spentIndex);
Copy link
Contributor

Choose a reason for hiding this comment

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

The second parameter inputNo to handleRemint is no longer necessary and should be removed. This will also imply by the code that a remint can only have one input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

riordant
riordant previously approved these changes Oct 3, 2019
@reubenyap reubenyap requested a review from psolstice October 4, 2019 08:10
src/txdb.cpp Outdated Show resolved Hide resolved
@reubenyap reubenyap requested a review from riordant October 7, 2019 08:33
@riordant riordant merged commit ba7b630 into master Oct 8, 2019
@riordant riordant deleted the fix_remint_50xzc branch October 8, 2019 07:02
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.

4 participants