Daily cherry pick#25
Open
rustaceanrob wants to merge 2 commits into
Open
Conversation
b6c3670 i2p: clean up SAM error logging (takeshikurosawaa) Pull request description: Clean up the I2P SAM error path. `SESSION CREATE` may contain the private key, so the generic SAM reply error path now reports the redacted request text instead of the full request. It also avoids echoing raw router replies in those generic error messages. No network behavior change intended. ACKs for top commit: davidgumberg: crACK bitcoin@b6c3670 vasild: ACK b6c3670 Tree-SHA512: 204c8b64c6d3dd2f94f92cdc6d3daefd7773c42066984b9da859ebc2912c2ed38079d9e82a2d1f09d8d720750047114a80189e688929d7a0af5da2c2ee4a88da (cherry picked from commit b2a3ca3)
…connman fuzz harness 371eac8 fuzz: exercise ForNode/ForEachNode callbacks in connman fuzz harness (frankomosh) Pull request description: Track inserted node IDs and sometimes reuse them in `ForNode()` so the successful lookup path is exercised more reliably. Replace no-op callbacks with lightweight CNode accessor calls to make `ForEachNode()` and `ForNode()` cover previously unreached callback code paths. This addresses feedback from bitcoin#34830 (comment) where it was noted that the callbacks had "neither the return type checked nor its side-effect”. Coverage reports from the connman fuzz corpus, before and after the change: - [Before](https://frankomosh.github.io/fuzz-coverage/connman-callback-coverage/before/index.html) - [After](https://frankomosh.github.io/fuzz-coverage/connman-callback-coverage/after/index.html) `diff cov_show_before.txt cov_show_after.txt` filtered to `ForNode`/`ForEachNode`/`IsFullOutboundConn`/`ConnectionTypeAsString`: **`IsFullOutboundConn` — `net.h:786-788`** ```diff - 786| 0| bool IsFullOutboundConn() const { - 787| 0| return m_conn_type == ConnectionType::OUTBOUND_FULL_RELAY; - 788| 0| } + 786| 1.13M| bool IsFullOutboundConn() const { + 787| 1.13M| return m_conn_type == ConnectionType::OUTBOUND_FULL_RELAY; + 788| 1.13M| } ``` **`ConnectionTypeAsString` — `net.h:967`** ```diff - 967| 0| std::string ConnectionTypeAsString() const { return ::ConnectionTypeAsString(m_conn_type); } + 967| 1.11M| std::string ConnectionTypeAsString() const { return ::ConnectionTypeAsString(m_conn_type); } ``` **`ForNode` — `net.cpp:4126-4131`** ```diff - 4126| 1.08k| if(pnode->GetId() == id) { - | Branch (4126:12): [True: 0, False: 1.08k] - 4127| 0| found = pnode; - 4131| 39| return found != nullptr && NodeFullyConnected(found) && func(found); - ^0 ^0 + 4126| 602| if(pnode->GetId() == id) { + | Branch (4126:12): [True: 1, False: 601] + 4127| 1| found = pnode; + 4131| 28| return found != nullptr && NodeFullyConnected(found) && func(found); + ^1 ^1 ``` **`ForEachNode` — `net.h:1270-1271`** ```diff - 1270| 1.13M| if (NodeFullyConnected(node)) - | Branch (1270:17): [True: 0, False: 1.13M] - 1271| 0| func(node); + 1270| 1.11M| if (NodeFullyConnected(node)) + | Branch (1270:17): [True: 1.11M, False: 0] + 1271| 1.11M| func(node); ``` Two previously uncovered functions (`IsFullOutboundConn`, `ConnectionTypeAsString`) are now exercised through the iteration callbacks. `ForNode` finds matching nodes. ACKs for top commit: nervana21: tACK 371eac8 maflcko: lgtm ACK 371eac8 Tree-SHA512: 3587c021b16e38ca252676a21b66c5383ab2bd3eec9073e61e9a93db7ef84a94ce5a0c037ac512483680cafabb44103b86df0893e8a9b1bf63b8383bd54f4641 (cherry picked from commit 278b9e3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.