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

Conversation

@a-bezrukov
Copy link
Contributor

a-bezrukov commented Oct 2, 2019

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
@reubenyap reubenyap added this to Needs review in Zcoin Core via automation Oct 2, 2019
@reubenyap reubenyap requested review from psolstice and riordant Oct 2, 2019
Copy link
Contributor

psolstice left a comment

LGTM

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);

This comment has been minimized.

Copy link
@riordant

riordant Oct 3, 2019

Contributor

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.

This comment has been minimized.

Copy link
@a-bezrukov

a-bezrukov Oct 3, 2019

Author Contributor

Good catch!

Andrey
@reubenyap reubenyap requested a review from psolstice Oct 4, 2019
src/txdb.cpp Outdated Show resolved Hide resolved
Andrey
@reubenyap reubenyap requested a review from riordant Oct 7, 2019
Zcoin Core automation moved this from Needs review to Reviewer approved Oct 8, 2019
@riordant riordant merged commit ba7b630 into master Oct 8, 2019
4 checks passed
4 checks passed
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
LGTM analysis: C/C++ No new or fixed alerts
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
Zcoin Core automation moved this from Reviewer approved to Done Oct 8, 2019
@riordant riordant deleted the fix_remint_50xzc branch Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Zcoin Core
  
Done
4 participants
You can’t perform that action at this time.