Skip to content

[Refactor] Move parts of AddAnonInputs into helper functions.#978

Merged
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:refactor
Mar 20, 2022
Merged

[Refactor] Move parts of AddAnonInputs into helper functions.#978
codeofalltrades merged 1 commit intoVeil-Project:masterfrom
Zannick:refactor

Conversation

@Zannick
Copy link
Collaborator

@Zannick Zannick commented Dec 2, 2021

Rearranges part of AddAnonInputs_Inner into separate helper functions so it's easier to understand and also to reuse the code elsewhere. I'm not sure I fully understood the code enough to properly name the helper functions, but here they are:

  • ArrangeBlinds
    • Places the real inputs and creates dummy entries for the ring.
    • Optionally adds temporary dummy sigs.
  • GetKeyImage
    • Attaches the key image for a real input.
    • I made this take one at a time for ease of calling from elsewhere.
  • SetBlinds
    • Does some further stuff to the blinds.

@Zannick Zannick self-assigned this Dec 2, 2021
@Zannick Zannick added Coin Type: RingCT Specifically related to RingCT transactions Tag: Waiting For Code Review Waiting for code review from a core developer labels Dec 2, 2021
@WetOne
Copy link
Collaborator

WetOne commented Dec 4, 2021

utACK 42dfa73

@Zannick Zannick force-pushed the refactor branch 2 times, most recently from d6f8dc0 to 7e80091 Compare March 12, 2022 21:35
@Zannick
Copy link
Collaborator Author

Zannick commented Mar 12, 2022

Fixed the following:

  • SetBlinds was called with nSigRingSize, nSigInputs reversed, causing a segfault.
  • SetBlinds was accepting some vector arguments by value; now all vectors are correctly passed by reference.
  • I had moved some vectors into SetBlinds cause they appeared otherwise unused, but they were storing data for other vectors and so needed to still be scoped to a longer lifetime than the others.

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK 91e7f97

@codeofalltrades codeofalltrades merged commit f7dc817 into Veil-Project:master Mar 20, 2022
@Zannick Zannick deleted the refactor branch March 20, 2022 16:49
@Zannick Zannick removed the Tag: Waiting For Code Review Waiting for code review from a core developer label Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Coin Type: RingCT Specifically related to RingCT transactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants