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

Backport P2P refactor #3305

Merged
merged 18 commits into from
Jan 31, 2020
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7f88a67
Merge #11363: net: Split socket create/connect
laanwj Dec 13, 2017
c261173
Merge #13946: p2p: Clarify control flow in ProcessMessage
laanwj Aug 25, 2018
88197c7
Merge #11448: [gui] reset addrProxy/addrSeparateProxyTor if colon cha…
laanwj Oct 9, 2017
94e9944
Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixin…
laanwj Jan 24, 2018
fccf28b
Merge #11577: Fix warnings (-Wsign-compare) when building with DEBUG_…
laanwj Jan 29, 2018
f4fb2c1
Merge #11583: Do not make it trivial for inbound peers to generate lo…
laanwj Dec 11, 2017
500a60a
Merge #11744: net: Add missing locks in net.{cpp,h}
laanwj Nov 30, 2017
4954939
Merge #12218: net: Move misbehaving logging to net logging category
laanwj Feb 6, 2018
211c8a3
Merge #12326: net: initialize socket to avoid closing random fd's
laanwj Feb 1, 2018
0357621
Merge #12329: net: don't retry failed oneshot connections forever
laanwj Feb 2, 2018
12a9809
Merge #12342: Extend #11583 to include "version handshake timeout" me…
laanwj Feb 6, 2018
a3ea0e9
Merge #12626: Limit the number of IPs addrman learns from each DNS se…
laanwj Mar 7, 2018
e7beff5
Merge #12855: net: Minor accumulated cleanups
laanwj Apr 19, 2018
0255027
Fix "\n"s
UdjinM6 Jan 28, 2020
6eb6298
More of 12218 for Dash-specific code
UdjinM6 Jan 28, 2020
67c8484
More of 11583 for Dash-specific code
UdjinM6 Jan 28, 2020
0d56f80
More of 13946
UdjinM6 Jan 28, 2020
5cc46c3
Merge #13162: [net] Don't incorrectly log that REJECT messages are un…
laanwj May 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge bitcoin#13162: [net] Don't incorrectly log that REJECT messages…
… are unknown.

fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery)

Pull request description:

  Reject messages are logged to debug.log if NET debug logging is enabled.

  Because of the way the `ProcessMessages()` function is structured,
  processing for REJECT messages will also drop through to the default
  branch and incorrectly log `Unknown command "reject" from peer-?`. Fix
  that by exiting from `ProcessMessages()` early.

  without this PR:
  ```
  2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0
  2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam
  2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0
  ```
  with this PR:
  ```
  2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0
  2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam
  ```

Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
laanwj authored and PastaPastaPasta committed Jan 28, 2020

Verified

This commit was signed with the committer’s verified signature.
commit 5cc46c34caa97f2cb0243cd2680d5e195776e00b
1 change: 1 addition & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
@@ -1790,6 +1790,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
}
LogPrint(BCLog::NET, "Reject %s\n", SanitizeString(ss.str()));
}
return true;
}

if (strCommand == NetMsgType::VERSION) {