-
Notifications
You must be signed in to change notification settings - Fork 384
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
fix vector length calculation for targets in BlindTransaction #514
fix vector length calculation for targets in BlindTransaction #514
Conversation
surjectionTargets.resize(tx.vin.size()*3); | ||
targetAssetGenerators.resize(tx.vin.size()*3); | ||
|
||
size_t maxTargets = tx.vin.size()*3; |
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.
Maybe note here that this is a strict upper-bound, and the size is likely less(and is shrunk later).
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.
added the comment
a8f5044
to
42a7a34
Compare
utACK 42a7a34 |
42a7a34
to
045335a
Compare
the size of surjectionTargets and targetAssetGenerator vectors was calculated as tx.vin.size()*3, based on the fact that for each input there might also be up to 2 issuance pseudo-inputs, but did not take into account that the number of auxiliary generators may exceed the number of inputs. This fixes the size calculations by taking into account auxiliary generators supplied beyond vin size.
Fixed mistype in comment: "The vectors will be srunk" -> "The vectors will be shrunk" |
utACK 045335a , spurious failure on one test, restarted. |
…tion 045335a fix vector length calculation for targets in BlindTransaction (Dmitry Petukhov)
The size of surjectionTargets and targetAssetGenerator vectors was calculated as tx.vin.size()*3, based on the fact that for each input there might also be up to 2 issuance pseudo-inputs, but did not take into account that the number of auxiliary generators may exceed the number of inputs. This fixes the size calculations by taking into account auxiliary generators supplied beyond vin size.