Fix edge case for IS (skip inputs that are too large)#1695
Merged
UdjinM6 merged 2 commits intodashpay:v0.12.2.xfrom Oct 25, 2017
Merged
Fix edge case for IS (skip inputs that are too large)#1695UdjinM6 merged 2 commits intodashpay:v0.12.2.xfrom
UdjinM6 merged 2 commits intodashpay:v0.12.2.xfrom
Conversation
codablock
reviewed
Oct 23, 2017
src/wallet/wallet.cpp
Outdated
| vfIncluded[i] = true; | ||
| if (nTotal >= nTargetValue) | ||
| { | ||
| if (fUseInstantSend && nTotal > sporkManager.GetSporkValue(SPORK_5_INSTANTSEND_MAX_VALUE)) { |
There was a problem hiding this comment.
It took me some time to understand what this actually does. As I understand it, it skips considering this input as candidate for the "best subset". If this is the intent, wouldn't it be better to just add if (nTotal + vValue[i].first > max) continue at the beginning of the inner loop (after line 2441)?
EDIT: Also, all the randomization stuff is unimportant for too large IX inputs, because it's nevertheless invalid for IX. So it's more clear when it's outside of these ifs.
|
utACK |
1 similar comment
|
utACK |
UdjinM6
added a commit
to UdjinM6/dash
that referenced
this pull request
Nov 3, 2017
UdjinM6
added a commit
that referenced
this pull request
Nov 3, 2017
codablock
added a commit
to codablock/dash
that referenced
this pull request
Dec 27, 2017
dashpay#1695 introduced a fix for a instant send related edge case. Somehow the parameters got mixed up and fUseInstantSend was passed as "iterations".
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jan 5, 2018
…et (dashpay#1819) dashpay#1695 introduced a fix for a instant send related edge case. Somehow the parameters got mixed up and fUseInstantSend was passed as "iterations".
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Dec 26, 2018
…et (dashpay#1819) dashpay#1695 introduced a fix for a instant send related edge case. Somehow the parameters got mixed up and fUseInstantSend was passed as "iterations".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selecting huge inputs will make IS fail due to violation of spork threshold, we must exclude them from our set of available inputs for IS txes.