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 #36397
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
<!--021abf342d371248e50ceaed478a90ca-->
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 <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
<!--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>
Both functions format a message to be logged, so it must not contain a
redundant trailing newline. Otherwise, it could lead to escaped \x0a
inside log messages.
ACK fafbcadc1bc512e16154649984d48b60a54f5f9d