refactor: Use util::log::FormatString in BaseIndex::FatalErrorf and LogConnectFailure #36580

Manually merged
maflcko merged 1 commit from 2610-log-format-string into master 2026-11-04 20:11:27 +00:00 AGit
maflcko commented 2026-10-20 09:20:39 +00:00 (Migrated from github.com)

Both functions format a message that is ultimately logged, so it must not contain a redundant trailing newline. Otherwise, it could lead to escaped \x0a inside log messages.

This continues https://github.com/bitcoin/bitcoin/pull/36397

Both functions format a message that is ultimately logged, so it must not contain a redundant trailing newline. Otherwise, it could lead to escaped \x0a inside log messages. This continues https://github.com/bitcoin/bitcoin/pull/36397
DrahtBot commented 2026-10-20 09:20:48 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK stickies-v

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36580 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36580.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36580#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [stickies-v](https://github.com/bitcoin/bitcoin/pull/36580#pullrequestreview-5597709570) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

Base: 6799119cef7ead71e2b2fc7928a0ea58d720c708
Head: fafbcadc1bc512e16154649984d48b60a54f5f9d

I found no actionable issues in this static review.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `6799119cef7ead71e2b2fc7928a0ea58d720c708` Head: `fafbcadc1bc512e16154649984d48b60a54f5f9d` I found no actionable issues in this static review. [Full review report](<https://review.fish.foo/traces/36580-fafbcadc1bc512e16154649984d48b60a54f5f9d-932-2.html>)
DrahtBot commented 2026-10-20 10:00:59 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task iwyu: https://github.com/bitcoin/bitcoin/actions/runs/39399987125/job/118552003400
LLM reason (✨ experimental): CI failed because IWYU removed the unused <util/string.h> include from src/index/base.cpp, leaving an uncommitted diff that the lint check rejects.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `iwyu`: https://github.com/bitcoin/bitcoin/actions/runs/39399987125/job/118552003400</sub> <sub>LLM reason (✨ experimental): CI failed because IWYU removed the unused `<util/string.h>` include from `src/index/base.cpp`, leaving an uncommitted diff that the lint check rejects.</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
stickies-v (Migrated from github.com) approved these changes 2026-10-21 09:35:02 +00:00
stickies-v (Migrated from github.com) left a comment
ACK fafbcadc1bc512e16154649984d48b60a54f5f9d
sedited (Migrated from github.com) approved these changes 2026-11-04 20:07:04 +00:00
sedited (Migrated from github.com) left a comment
ACK fafbcadc1bc512e16154649984d48b60a54f5f9d
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36580
No description provided.