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

feature: Enable setting a node address for a dandelion peer #2263

Merged
merged 3 commits into from
Dec 31, 2018

Conversation

svechinsky
Copy link
Contributor

So this should address #1250
I don't have too much experience with rust so not sure if this is the right way to do it.
I also don't have much idea as to the best way to test this, what's the best way to go about it?

@@ -230,6 +230,10 @@ fn comments() -> HashMap<String, String> {

# 15 = Bit flags for FULL_NODE
#This structure needs to be changed internally, to make it more configurable

# A prefered dandelion_peer, mainly used for testing dandelion
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: preferred

Copy link
Contributor

@ignopeverell ignopeverell left a comment

Choose a reason for hiding this comment

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

Great choice for a first PR! As it's your first, thought I'd add some stylistic comments, hopefully this helps. Keep it up!

p2p/src/peers.rs Outdated
"Successfully updated Dandelion relay to: {}",
peer.info.addr
);
match &self.config.dandelion_peer {
Copy link
Contributor

Choose a reason for hiding this comment

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

This would likely look nicer (and more idiomatic) if you first looked for and assigned the peer your want to set as relay, and then did the set on that. Look for the find method from Iterator.

@ignopeverell ignopeverell merged commit e784cf4 into mimblewimble:master Dec 31, 2018
@ignopeverell
Copy link
Contributor

Awesome, thanks for the improvement!

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

Successfully merging this pull request may close these issues.

3 participants