Skip to content

[Multisend][Wallet] Don't send multiple multisend transactions for a stake that resulted …#992

Closed
CryptoDev-Project wants to merge 1 commit into
PIVX-Project:masterfrom
CryptoDev-Project:master
Closed

[Multisend][Wallet] Don't send multiple multisend transactions for a stake that resulted …#992
CryptoDev-Project wants to merge 1 commit into
PIVX-Project:masterfrom
CryptoDev-Project:master

Conversation

@CryptoDev-Project
Copy link
Copy Markdown

…in a UTXO split

At the moment, where the UTXO that wins a staking reward is split, the subsequent multi-send transaction sends the value of the staking reward multiple times - once per split output.

@CryptoDev-Project
Copy link
Copy Markdown
Author

Of course, a slightly more complex solution involving splitting the value of the staking reward over each output could be put in place - but I don't believe that offers any advantage to the user, adds to chain bloat and unnecessary additional fees would be incurred by the recipient of the staking reward.

@furszy furszy self-requested a review September 3, 2019 16:23
Copy link
Copy Markdown

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

I know this is from the existing code and not the changed code; but the !sendMSonMNReward I believe is unnecessary; as sendMSonMNReward will only be true if the output is a masternode reward, which would mean that ut.tx->IsCoinStake() will be false. So if the setting of sendMSOnStake finds "IsCoinStake() to be true, !sendNSonMNReward will always be true; so it has no effect on the logic.

@CryptoDev-Project
Copy link
Copy Markdown
Author

CryptoDev-Project commented Sep 13, 2019

@CaveSpectre11 , my understanding is that IsCoinStake is at transaction level and the masternode reward is merely an additional output to the coin stake transaction.

Therefore, I believe it to be the case that IsCoinStake, which merely checks that there is more than one transaction output, the first of which must be empty, can be true whilst the coins themselves are actually sourced from the masternode reward.

@CryptoDev-Project
Copy link
Copy Markdown
Author

Closing this PR with minor fix as #1096 offers a much more complete solution, especially now that stake splitting can result in many, as opposed to just two, outputs.

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.

3 participants