Remove unused MaybeSetAddrName#22782
Conversation
hebasto
left a comment
There was a problem hiding this comment.
promag
left a comment
There was a problem hiding this comment.
Code review ACK fa2d049bfe4f1365011e440adaeb096ddd544143.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK. This was introduced in f9f5cfc, and it looks like it would never work as intended, since the The comment above explains the intention here: |
This logic is a no-op since it was introduced in commit f9f5cfc. m_addr_name is never initialized to the empty string, because ToStringIPPort never returns an empty string.
fa2d049 to
fa973e4
Compare
jnewbery
left a comment
There was a problem hiding this comment.
Code review ACK fa973e4d2f50e952fed0aeba7a1a6132f9968a7c
Couple of suggestions for follow-ups.
src/net.cpp
Outdated
There was a problem hiding this comment.
Could be simplified further to:
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -415,9 +415,7 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
}
// It is possible that we already have a connection to the IP/port pszDest resolved to.
// In that case, drop the connection that was just created.
- LOCK(cs_vNodes);
- CNode* pnode = FindNode(static_cast<CService>(addrConnect));
- if (pnode) {
+ if (FindNode(static_cast<CService>(addrConnect)));
LogPrintf("Failed to open new connection, already connected\n");
return nullptr;
}but probably best left for a future PR. Same for the call to FindNode() above.
fa973e4 to
fabbe64
Compare
|
I've force pushed to address a review comment. Happy to revert to the version that had two ACKs, just let me know. |
fabbe64 to
fa9eade
Compare
|
Code review ACK fa9eade |
|
utACK fa9eade |
.