scripted-diff: [wallet] Remove trailing newlines from one-line log messages #36397

pull maflcko wants to merge 5 commits into bitcoin:master from maflcko:2610-log-format-string-trailing-newline changing 14 files +119 −102
  1. maflcko commented at 11:58 AM on October 1, 2026: member

    This is a low-prio style cleanup for years, but:

    So I wonder if a simple scripted-diff can cover the bulk of the changes now, with hopefully little conflicts with reviewed pull requests.

    (Removing the trailing newlines from the remaining log messages is trivial and can be done in a later pull)

  2. DrahtBot renamed this:
    scripted-diff: Remove trailing newlines from one-line log messages
    scripted-diff: Remove trailing newlines from one-line log messages
    on Oct 1, 2026
  3. DrahtBot added the label Refactoring on Oct 1, 2026
  4. DrahtBot commented at 11:58 AM on October 1, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    ACK l0rinc, sedited
    Stale ACK willcl-ark

    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.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #bitcoin-core/gui/939 <sub><img src="https://drahtbot.space/ack_count/bitcoin-core/gui/939.svg"></sub> (gui: show wallet name in progress messages by ShauryaaSharma)
    • #36536 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36536.svg"></sub> (log: escape C1 control characters in messages by fametrano)
    • #36268 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36268.svg"></sub> (refactor: prune unused semi-colons by fanquake)
    • #36031 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36031.svg"></sub> (wallet: Remove mapMasterKeys and enforce that only one encryption key can exist by achow101)
    • #35444 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35444.svg"></sub> (wallet: make descriptor SPKM mutex non-recursive by w0xlt)
    • #34909 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34909.svg"></sub> (wallet, refactor: modularise wallet by extracting out legacy wallet migration by rkrux)
    • #34778 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34778.svg"></sub> (logging: rewrite macros to enforce restrictions at compile-time, improve efficiency and usability by ryanofsky)
    • #34400 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34400.svg"></sub> (wallet: parallel fast rescan (approx 8x speed up with 8 threads) by Eunovo)
    • #33033 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/33033.svg"></sub> (wallet, sqlite: Encapsulate SQLite statements in a RAII class by achow101)
    • #30343 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/30343.svg"></sub> (wallet, logging: Replace WalletLogPrintf() with LogInfo() by ryanofsky)
    • #29256 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/29256.svg"></sub> (log, refactor: Allow log macros to accept context arguments by ryanofsky)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • src/wallet/wallet.cpp: Wallet passphrase changed to an nDeriveIterations of %i → Wallet passphrase changed; nDeriveIterations = %i [the current wording incorrectly suggests the passphrase was changed to an iteration count]
    • src/wallet/wallet.cpp: Encrypting Wallet with an nDeriveIterations of %i → Encrypting wallet with nDeriveIterations = %i [the current wording is grammatically broken]

    <sup>2026-10-19 08:38:50</sup>

  5. maflcko marked this as a draft on Oct 1, 2026
  6. maflcko commented at 12:10 PM on October 1, 2026: member

    39 conflicts right now. Not sure what number is acceptable, but the focus should probably be to not invalidate any current acks

  7. willcl-ark commented at 12:33 PM on October 1, 2026: member

    39 conflicts right now. Not sure what number is acceptable, but the focus should probably be to not invalidate any current acks.

    I've wondered this before, but am again wondering if there's a way to have this drahtbot comment also display how many current (full) ACKs are on each of these? IIRC previously I thought it may be a bit tricky/probably not worth it, but with LLMs maybe it might be possible to show?

    I think 39 conflicts is probably a strong enough signal on it's own here, but when there's 5 or 6 it can be useful (but tedious) to click each one and actually see the state of it...

  8. l0rinc commented at 6:26 PM on October 1, 2026: contributor

    Concept ACK - could a linter check that we don't add new ones?

    If we do these big messy refactors, they should be done at the beginning of the release cycle (i.e. soon), and maybe we could ping the people affected, and whoever reviews this could help re-ACK the invalidated ones. +1 for adding valid ACK count to drahtbot.

  9. DrahtBot added the label Needs rebase on Oct 3, 2026
  10. maflcko force-pushed on Oct 5, 2026
  11. DrahtBot removed the label Needs rebase on Oct 5, 2026
  12. maflcko commented at 2:19 PM on October 5, 2026: member

    Concept ACK - could a linter check that we don't add new ones?

    It should be checked at compile time, but this can be done later.

    If we do these big messy refactors, they should be done at the beginning of the release cycle (i.e. soon)

    I'd say no, because the beginning of the cycle is best used for features (gives them more time to sit). Also, backports are easier if refactors are done later.

  13. maflcko force-pushed on Oct 5, 2026
  14. maflcko renamed this:
    scripted-diff: Remove trailing newlines from one-line log messages
    scripted-diff: [wallet] Remove trailing newlines from one-line log messages
    on Oct 5, 2026
  15. maflcko force-pushed on Oct 5, 2026
  16. maflcko marked this as ready for review on Oct 5, 2026
  17. DrahtBot added the label CI failed on Oct 5, 2026
  18. DrahtBot commented at 4:02 PM on October 5, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task Alpine (musl): https://github.com/bitcoin/bitcoin/actions/runs/37332770376/job/111839778318</sub> <sub>LLM reason (✨ experimental): The build failed because wallet.cpp passes a format string ending in a newline to WalletLogPrintf, which the compile-time format 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>

  19. maflcko commented at 4:03 PM on October 5, 2026: member

    There are no reviewed wallet conflicts, so I limited the change to wallet for now. Also, enforced it at compile time.

  20. DrahtBot removed the label CI failed on Oct 5, 2026
  21. willcl-ark approved
  22. willcl-ark commented at 10:10 AM on October 6, 2026: member

    ACK fa3da29147d52946155ad48e60deec8d0f18505d

    I think ralphs suggestion here is legit, but I don't think it's worth fixing.

    Agree with l0rinc that a lint check could be nice for this after the remainder are fixed.

  23. DrahtBot requested review from l0rinc on Oct 6, 2026
  24. maflcko commented at 11:33 AM on October 6, 2026: member

    I think ralphs suggestion here is legit, but I don't think it's worth fixing.

    Heh, as Ralph says, there should be no production impact/change here, so this is still a refactor. In any case, avoiding a double-newline seems beneficial, so this is either irrelevant or this pull has it "fixed".

    Agree with l0rinc that a lint check could be nice for this after the remainder are fixed.

    Not sure I understand this. This is already rejected at compile time, see #36397 (comment). So not sure what a redundant linter could achieve here?

  25. maflcko removed review request from l0rinc on Oct 16, 2026
  26. maflcko requested review from l0rinc on Oct 16, 2026
  27. in src/wallet/walletdb.cpp:1212 in fa3da29147 outdated
    1208 | @@ -1209,7 +1209,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
    1209 |          // Any uncaught exceptions will be caught here and treated as critical.
    1210 |          // Catch std::runtime_error specifically as many functions throw these and they at least have some message that
    1211 |          // we can log
    1212 | -        pwallet->WalletLogPrintf("%s\n", e.what());
    1213 | +        pwallet->WalletLogPrintf("%s", e.what());
    


    l0rinc commented at 2:00 PM on October 17, 2026:

    fa3da29 wallet: Reject trailing newline in format strings:

    nit: Ralph may be right (but even if not), GetNewPrefixCursor can probably reach the wallet log - if you push again, consider dropping the suffix from both cursor setup errors too

    <details><summary>Remove the cursor error newlines</summary>

    diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp
    index fa2abc93a5..c72b77779d 100644
    --- a/src/wallet/sqlite.cpp
    +++ b/src/wallet/sqlite.cpp
    @@ -613,7 +613,7 @@ std::unique_ptr<DatabaseCursor> SQLiteBatch::GetNewCursor()
         int res = sqlite3_prepare_v2(m_database.m_db, stmt_text, -1, &cursor->m_cursor_stmt, nullptr);
         if (res != SQLITE_OK) {
             throw std::runtime_error(strprintf(
    -            "%s: Failed to setup cursor SQL statement: %s\n", __func__, sqlite3_errstr(res)));
    +            "%s: Failed to setup cursor SQL statement: %s", __func__, sqlite3_errstr(res)));
         }
     
         return cursor;
    @@ -650,7 +650,7 @@ std::unique_ptr<DatabaseCursor> SQLiteBatch::GetNewPrefixCursor(std::span<const
         int res = sqlite3_prepare_v2(m_database.m_db, stmt_text, -1, &cursor->m_cursor_stmt, nullptr);
         if (res != SQLITE_OK) {
             throw std::runtime_error(strprintf(
    -            "SQLiteDatabase: Failed to setup cursor SQL statement: %s\n", sqlite3_errstr(res)));
    +            "SQLiteDatabase: Failed to setup cursor SQL statement: %s", sqlite3_errstr(res)));
         }
     
         if (!BindBlobToStatement(cursor->m_cursor_stmt, 1, cursor->m_prefix_range_start, "prefix_start")) return nullptr;
    

    </details>


    maflcko commented at 8:44 AM on October 19, 2026:

    Hmm, if this is changed, it should be changed for all strings all at once. Pushed a commit to do this.

  28. in src/util/string.h:95 in fa3da29147
      91 | @@ -92,10 +92,16 @@ constexpr void CheckNumFormatSpecifiers(const char* str)
      92 |   * run-time. Validation is partial to try and prevent the most common errors
      93 |   * while avoiding re-implementing the entire parsing logic.
      94 |   */
      95 | -template <unsigned num_params>
      96 | +template <unsigned num_params, bool permit_trailing_newline = true>
    


    l0rinc commented at 2:29 PM on October 17, 2026:

    fa3da29 wallet: Reject trailing newline in format strings:

    This seems a bit hacky to me. Adding a boolean on the general ConstevalFormatString leaks the newline check into tinyformat and index code. Please consider moving the validation into util::log::FormatString instead, where trailing newlines are already rejected.

    <details><summary>Keep the newline check in logging</summary>

    diff --git a/src/index/base.h b/src/index/base.h
    index 9890e019da..731bbd26ba 100644
    --- a/src/index/base.h
    +++ b/src/index/base.h
    @@ -12,7 +12,6 @@
     #include <sync.h>
     #include <uint256.h>
     #include <util/fs.h>
    -#include <util/string.h>
     #include <util/threadinterrupt.h>
     #include <validationinterface.h>
     
    @@ -37,6 +36,11 @@ struct IndexSummary {
     namespace interfaces {
     struct BlockRef;
     }
    +namespace util {
    +template <unsigned int num_params>
    +struct ConstevalFormatString;
    +}
    +
     /**
      * Base class for indices of blockchain data. This implements
      * CValidationInterface and ensures blocks are indexed sequentially according
    diff --git a/src/test/logging_tests.cpp b/src/test/logging_tests.cpp
    index d71bc22ef9..505a40eab9 100644
    --- a/src/test/logging_tests.cpp
    +++ b/src/test/logging_tests.cpp
    @@ -21,6 +21,7 @@
     #include <iostream>
     #include <source_location>
     #include <string>
    +#include <type_traits>
     #include <unordered_map>
     #include <utility>
     #include <vector>
    @@ -35,6 +36,12 @@ namespace BCLog {
         std::string LogEscapeMessage(std::string_view str);
     }
     
    +template <auto str>
    +concept IsLogFormatString = requires { typename std::bool_constant<(util::log::FormatString<0>{str()}, true)>; };
    +
    +static_assert( IsLogFormatString<[] { return "format string without a trailing newline"; }>);
    +static_assert(!IsLogFormatString<[] { return "format string ending in a newline\n"; }>);
    +
     BOOST_FIXTURE_TEST_SUITE(logging_tests, BasicTestingSetup)
     
     static void ResetLogger()
    diff --git a/src/test/util_string_tests.cpp b/src/test/util_string_tests.cpp
    index 73ee89ce54..894c592ed0 100644
    --- a/src/test/util_string_tests.cpp
    +++ b/src/test/util_string_tests.cpp
    @@ -2,32 +2,18 @@
     // Distributed under the MIT software license, see the accompanying
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
    -#include <test/util/common.h>
    -#include <tinyformat.h>
     #include <util/strencodings.h>
     #include <util/string.h>
     
     #include <boost/test/unit_test.hpp>
    -
    -#include <type_traits>
    +#include <test/util/common.h>
    +#include <tinyformat.h>
     
     using namespace util;
     using util::detail::CheckNumFormatSpecifiers;
     
     BOOST_AUTO_TEST_SUITE(util_string_tests)
     
    -namespace {
    -constexpr char NO_TRAILING_NEWLINE[] = "format string without a trailing newline";
    -constexpr char TRAILING_NEWLINE[] = "format string ending in a newline\n";
    -
    -template <const char* str>
    -concept IsStrictFormatString =
    -    requires { typename std::bool_constant<(ConstevalFormatString</*num_params=*/0, /*permit_trailing_newline=*/false>{str}, true)>; };
    -
    -static_assert(IsStrictFormatString<NO_TRAILING_NEWLINE>);
    -static_assert(!IsStrictFormatString<TRAILING_NEWLINE>);
    -} // namespace
    -
     template <unsigned NumArgs>
     void TfmFormatZeroes(const std::string& fmt)
     {
    diff --git a/src/tinyformat.h b/src/tinyformat.h
    index c21a7507b0..444cd6ded5 100644
    --- a/src/tinyformat.h
    +++ b/src/tinyformat.h
    @@ -193,8 +193,7 @@ template <unsigned num_params>
     struct FormatStringCheck {
         consteval FormatStringCheck(const char* str) : fmt{util::ConstevalFormatString<num_params>{str}.fmt} {}
         FormatStringCheck(LIFETIMEBOUND const RuntimeFormat& run) : fmt{run.fmt.c_str()} {}
    -    template <bool permit_trailing_newline>
    -    FormatStringCheck(util::ConstevalFormatString<num_params, permit_trailing_newline> str) : fmt{str.fmt} {}
    +    FormatStringCheck(util::ConstevalFormatString<num_params> str) : fmt{str.fmt} {}
         operator const char*() { return fmt; }
         const char* fmt;
     };
    diff --git a/src/util/log.h b/src/util/log.h
    index 33d0b91bdf..9dbbadc60d 100644
    --- a/src/util/log.h
    +++ b/src/util/log.h
    @@ -80,6 +80,15 @@ bool ShouldTraceLog(Category category);
     /** Send message to be logged. Applications using the logging library need to provide this. */
     void Log(Entry entry);
     
    +/** A format string for a log entry. The logger appends the trailing newline, so reject one in the format. */
    +template <unsigned num_params>
    +struct FormatString : util::ConstevalFormatString<num_params> {
    +    consteval FormatString(const char* str) : util::ConstevalFormatString<num_params>{str}
    +    {
    +        if (std::string_view{str}.ends_with('\n')) throw "Format string must not end with a newline";
    +    }
    +};
    +
     template <typename... Args>
     inline void LogPrintFormatInternal_(SourceLocation&& source_loc, BCLog::LogFlags flag, util::log::Level level, bool should_ratelimit, util::ConstevalFormatString<sizeof...(Args)> fmt, const Args&... args)
     {
    diff --git a/src/util/string.h b/src/util/string.h
    index 0809e84c8a..b2be2e7f64 100644
    --- a/src/util/string.h
    +++ b/src/util/string.h
    @@ -92,16 +92,10 @@ constexpr void CheckNumFormatSpecifiers(const char* str)
      * run-time. Validation is partial to try and prevent the most common errors
      * while avoiding re-implementing the entire parsing logic.
      */
    -template <unsigned num_params, bool permit_trailing_newline = true>
    +template <unsigned num_params>
     struct ConstevalFormatString {
         const char* const fmt;
    -    consteval ConstevalFormatString(const char* str) : fmt{str}
    -    {
    -        detail::CheckNumFormatSpecifiers<num_params>(fmt);
    -        if constexpr (!permit_trailing_newline) {
    -            if (std::string_view{fmt}.ends_with('\n')) throw "Format string must not end with a newline";
    -        }
    -    }
    +    consteval ConstevalFormatString(const char* str) : fmt{str} { detail::CheckNumFormatSpecifiers<num_params>(fmt); }
     };
     
     /// Replace every non-overlapping occurrence of `search` with `substitute`, treating both literally; the replacement text is not searched again.
    diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
    index 6343746239..f9b7303285 100644
    --- a/src/wallet/scriptpubkeyman.h
    +++ b/src/wallet/scriptpubkeyman.h
    @@ -147,7 +147,7 @@ public:
     
         /** Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */
         template <typename... Params>
    -    void WalletLogPrintf(util::ConstevalFormatString<sizeof...(Params), /*permit_trailing_newline=*/false> wallet_fmt, const Params&... params) const
    +    void WalletLogPrintf(util::log::FormatString<sizeof...(Params)> wallet_fmt, const Params&... params) const
         {
             LogInfo("[%s] %s", m_storage.LogName(), tfm::format(wallet_fmt, params...));
         };
    diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
    index ad67aa0b4b..350d7e4db1 100644
    --- a/src/wallet/wallet.h
    +++ b/src/wallet/wallet.h
    @@ -923,7 +923,7 @@ public:
     
         /** Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */
         template <typename... Params>
    -    void WalletLogPrintf(util::ConstevalFormatString<sizeof...(Params), /*permit_trailing_newline=*/false> wallet_fmt, const Params&... params) const
    +    void WalletLogPrintf(util::log::FormatString<sizeof...(Params)> wallet_fmt, const Params&... params) const
         {
             LogInfo("[%s] %s", LogName(), tfm::format(wallet_fmt, params...));
         };
    

    </details>


    maflcko commented at 8:44 AM on October 19, 2026:

    Yeah, I guess formatting itself shouldn't care about newlines and this is log specific. Pushed your diff and added you as co-author.

  29. in src/test/util_string_tests.cpp:23 in fa3da29147
      20 |  
      21 | +namespace {
      22 | +constexpr char NO_TRAILING_NEWLINE[] = "format string without a trailing newline";
      23 | +constexpr char TRAILING_NEWLINE[] = "format string ending in a newline\n";
      24 | +
      25 | +template <const char* str>
    


    l0rinc commented at 2:47 PM on October 17, 2026:

    fa3da29 wallet: Reject trailing newline in format strings:

    nit: I think we can make the concept arg a callable, which would let us inline the strings:

    <details><summary>Inline the format strings as callables</summary>

    diff --git a/src/test/util_string_tests.cpp b/src/test/util_string_tests.cpp
    index 73ee89ce54..17a54e101e 100644
    --- a/src/test/util_string_tests.cpp
    +++ b/src/test/util_string_tests.cpp
    @@ -16,17 +16,12 @@ using util::detail::CheckNumFormatSpecifiers;
     
     BOOST_AUTO_TEST_SUITE(util_string_tests)
     
    -namespace {
    -constexpr char NO_TRAILING_NEWLINE[] = "format string without a trailing newline";
    -constexpr char TRAILING_NEWLINE[] = "format string ending in a newline\n";
    -
    -template <const char* str>
    +template <auto str>
     concept IsStrictFormatString =
    -    requires { typename std::bool_constant<(ConstevalFormatString</*num_params=*/0, /*permit_trailing_newline=*/false>{str}, true)>; };
    +    requires { typename std::bool_constant<(ConstevalFormatString</*num_params=*/0, /*permit_trailing_newline=*/false>{str()}, true)>; };
     
    -static_assert(IsStrictFormatString<NO_TRAILING_NEWLINE>);
    -static_assert(!IsStrictFormatString<TRAILING_NEWLINE>);
    -} // namespace
    +static_assert( IsStrictFormatString<[] { return "format string without a trailing newline"; }>);
    +static_assert(!IsStrictFormatString<[] { return "format string ending in a newline\n"; }>);
     
     template <unsigned NumArgs>
     void TfmFormatZeroes(const std::string& fmt)
    

    </details>


    maflcko commented at 8:44 AM on October 19, 2026:

    heh, nice code-golf. Pushed.

  30. l0rinc commented at 2:48 PM on October 17, 2026: contributor

    ACK fa3da29147d52946155ad48e60deec8d0f18505d, with a few optional suggestions to simplify the validation and tests.

  31. sedited commented at 7:36 AM on October 19, 2026: contributor

    @maflcko do you want to take l0rinc's nits?

  32. test: [move-only] Move test_LogEscapeMessage to logging tests
    It is the only logging test in util tests and should sit with the other
    logging tests instead.
    
    Can be reviewed with --color-moved=dimmed-zebra
    fa89aeec85
  33. wallet: Remove inconsistent and redundant trailing error newlines
    Most wallet runtime error strings do not have a trailing newline. Only a
    few in sqlite.cpp have them. This is inconsistent and confusing, because
    printing and logging will already append a newline, if needed. Also, for
    error strings returned via RPC, it should be up to the caller to format
    messages.
    fa6c7942ad
  34. scripted-diff: [wallet] Remove trailing newlines from one-line log messages
    The replacement skips log messages that contain: " or \
    This keeps the script simple and allows to handle the special cases
    manually.
    
    -BEGIN VERIFY SCRIPT-
    
     sed --in-place --regexp-extended 's/(WalletLogPrintf\([^\"]*"[^\"\\]*)\\n"([,)])/\1"\2/g' $(
           git grep -l --extended-regexp 'WalletLogPrintf' ./src
     )
    
    -END VERIFY SCRIPT-
    fa57d5244b
  35. util: Add option to reject trailing newline in format strings
    This refactor does not change any behavior.
    
    Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
    fada75ccb0
  36. wallet: Reject trailing newline in format strings
    This refactor does not change any behavior.
    fa0c552cc5
  37. maflcko force-pushed on Oct 19, 2026
  38. maflcko commented at 8:43 AM on October 19, 2026: member

    Rebased (for the scripted-diff), and pushed the nits, which seemed nice and hopefully make Ralph Review happy.

  39. in src/wallet/wallet.cpp:253 in fa0c552cc5
     249 | @@ -250,7 +250,7 @@ static std::set<std::string> g_unloading_wallet_set GUARDED_BY(g_wallet_release_
     250 |  static void FlushAndDeleteWallet(CWallet* wallet)
     251 |  {
     252 |      const std::string name = wallet->GetName();
     253 | -    wallet->WalletLogPrintf("Releasing wallet %s..\n", name);
     254 | +    wallet->WalletLogPrintf("Releasing wallet %s..", name);
    


    l0rinc commented at 6:21 PM on October 19, 2026:

    nit: based on other cases, this was probably meant to end with an ellipsis - if you touch this again:

        wallet->WalletLogPrintf("Releasing wallet %s...", name);
    
  40. l0rinc approved
  41. l0rinc commented at 6:37 PM on October 19, 2026: contributor

    ACK fa0c552cc5abdd0a7e7f2c9cfc1491240494f352

    Reviewed the diff and re-reviewed the commits manually, verified the scripted diff, and ran the tests locally.

    hopefully make Ralph Review happy

    Happy Ralph, happy life

  42. DrahtBot requested review from willcl-ark on Oct 19, 2026
  43. sedited approved
  44. sedited commented at 7:46 AM on October 20, 2026: contributor

    ACK fa0c552cc5abdd0a7e7f2c9cfc1491240494f352

    This is low prio, but it does improve something that has been annoying me. Looks like there are fewer conflicts than before, and it only seems to invalidate single ack at the moment, so I'm putting this in now. I don't think there will be an ideal moment for this.

  45. sedited merged this on Oct 20, 2026
  46. sedited closed this on Oct 20, 2026

  47. maflcko commented at 8:27 AM on October 20, 2026: member

    This is low prio, but it does improve something that has been annoying me.

    Same. To clarify why I never addressed this for years, but created this pull now: After #35833, there now also a bunch of logging bugs with embedded \x0a in the log lines, like this (from running feature_filelock.py on previous master)

     node1 2026-10-20T08:20:45.649666Z [init] [wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/tmp/bitcoin_func_test_a43_hxup/node0/regtest/wallets/clezcl/wallet.dat] SQLite Statement: BEGIN EXCLUSIVE TRANSACTION 
     node1 2026-10-20T08:20:45.649707Z [init] [noui.cpp:29] [noui_ThreadSafeMessageBox] [error] SQLiteDatabase: Unable to obtain an exclusive lock on the database, is it being used by another instance of Bitcoin Core?\x0a 
     node1 2026-10-20T08:20:45.649719Z [init] [httpserver.cpp:1403] [InterruptHTTPServer] [http] Interrupting HTTP server 
    

    This is harmless, but looks a bit like corrupt logs, so it would be good to fix, which this pull did.

    There are still a few follow-ups and I'll try to fan them out over time.

  48. maflcko deleted the branch on Oct 20, 2026
  49. willcl-ark approved
  50. willcl-ark commented at 8:39 AM on October 20, 2026: member

    Post-merge reACK fa0c552cc5abdd0a7e7f2c9cfc1491240494f352


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-21 18:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me