Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

RouterInfo: refactor RI writer/creator + add docs #626

Merged
merged 2 commits into from
Apr 21, 2017

Conversation

anonimal
Copy link
Collaborator

@anonimal anonimal commented Apr 21, 2017

WIP. Live tests pass. Referencing #617 #621. This WIP is in pursuit of isolating #187.

Edit: referencing #627


By submitting this pull-request, I confirm the following:

  • I have read and understood the Contributing Guide.
  • I have checked that another pull-request for this purpose does not exist.
  • I have considered and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used and that this pull-request may be closed by the will of the maintainer.
  • I give this submission freely under the BSD 3-clause license.

- It's now maintainable. Allows us to finish previously unfinished
  development add new features such as Family Options and more

- Separates/pulls-out/improves usable stream writing code
  (now refactored into utility code)

- Adds documentation + TODO's

- Related refactoring
s.write(reinterpret_cast<char *>(ident), ident_len);
WriteToStream(s);
m_BufferLen = s.str().size();
void RouterInfo::CreateBuffer(const PrivateKeys& private_keys) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong brackets style (Sorry, it was too tempting :) )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I chose not to run clang-format on this function because it would've done more than just newline brace and, from the contributing guide:

please try to not mix formatting fixes with non-formatting commits

I'm guilty of mixing elsewhere but that's because of the amount of re-write that was involved (in those places).

If this brace bugs you enough, that can be fixed. Otherwise, I had planned on doing a complete style check-in / running clang-format on both files once RI refactoring was done.

Copy link
Contributor

Choose a reason for hiding this comment

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

It was mostly for the joke

@anonimal anonimal merged commit 97bdf53 into monero-project:master Apr 21, 2017
anonimal added a commit that referenced this pull request Apr 21, 2017
97bdf53 RouterInfo: refactor RI writer/creator (anonimal)
4af22c6 RouterInfo: add docs to caps flag traits (anonimal)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants