-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Add RPC function to regenerate mint pool if incorrect indexes used #566
Conversation
src/hdmint/wallet.cpp
Outdated
{ | ||
bool fFound = false; | ||
for(auto serialPubcoinPair : serialPubcoinPairs){ | ||
GroupElement pubcoin = serialPubcoinPair.second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify what you mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pubcoin is a copy now. I think making it GroupElement const & pubcoin = serialPubcoinPair.second
will be better performance-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be like this const GroupElement& pubcoin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be more readable if we keep this line, only make it const reference.
src/hdmint/wallet.cpp
Outdated
{ | ||
bool fFound = false; | ||
for(auto serialPubcoinPair : serialPubcoinPairs){ | ||
GroupElement pubcoin = serialPubcoinPair.second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pubcoin is a copy now. I think making it GroupElement const & pubcoin = serialPubcoinPair.second
will be better performance-wise.
PR intention
FIxes an issue where wallets, generated with HD mint prior to 0.13.8.2, have mints that are always stuck in "pending" on the Sigma page. This is due to incorrect indexes being generated for the mint pool database functions in the 0.13.8.1 release. The fix is simply to regenerate the mint pool from the known values, and add with the correct indexes.
Also adds increased logging level generally for HD mint code.
Code changes brief
regeneratemintpool
RegenerateMintPoolEntry
to return a uint256 pair -<hashPubcoin, hashSerial>