Skip to content
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

refactor: split parsing peers into multiple steps #994

Open
wants to merge 8 commits into
base: next
Choose a base branch
from

Conversation

ArneBab
Copy link
Contributor

@ArneBab ArneBab commented Nov 12, 2024

The previous code nested too much error handling even though many parts are independent.

This is a cleanup as sideeffect of trying to multi-thread the peer initialization. That multi-threading turned out to be unnecessary, but the cleanup is nice without it.

The previous code nested too much error handling even though many
parts are independent.
@ArneBab ArneBab force-pushed the refactor--split-parsing-peers-into-multiple-simpler-steps branch from 5414fca to 13c71cb Compare November 12, 2024 21:32
// read the peers file
try {
while (true) {
peerEntries.add(new SimpleFieldSet(br, false, true));
Copy link
Contributor

Choose a reason for hiding this comment

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

You’re mixing different kinds of whitespace here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resisting the urge to do a full file whitespace cleanup that would cause merging issues

}
}

for (PeerNode pn : createdNodes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if this whole block is only copied, please add braces for all parts of if statements. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Braces and spaces added (and some tabify) ☺

@ArneBab
Copy link
Contributor Author

ArneBab commented Dec 13, 2024

ready to be merged, as discussed with Bombe in FLIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants