mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 00:05:13 +02:00
Merge bitcoin/bitcoin#28237: refactor: Enforce C-str fmt strings in WalletLogPrintf()
fa60fa3b0cbitcoin-tidy: Apply bitcoin-unterminated-logprintf to spkm as well (MarcoFalke)faa11434ferefactor: Enable all clang-tidy plugin bitcoin tests (MarcoFalke)fa6dc57760refactor: Enforce C-str fmt strings in WalletLogPrintf() (MarcoFalke)fa244f3321doc: Fix bitcoin-unterminated-logprintf tidy comments (MarcoFalke) Pull request description: All fmt functions only accept a raw C-string as argument. There should never be a need to pass a format string that is not a compile-time string literal, so disallow it in `WalletLogPrintf()` to avoid accidentally introducing it. Apart from consistency, this also fixes the clang-tidy plugin bug https://github.com/bitcoin/bitcoin/pull/26296#discussion_r1286821141. ACKs for top commit: theuni: ACKfa60fa3b0cTree-SHA512: fa6f4984c50f9b34e850bdfee7236706af586e512d866cc869cf0cdfaf9aa707029c210ca72d91f85e75fcbd8efe0d77084701de8c3d2004abfd7e46b6fa9072
This commit is contained in:
@@ -2320,7 +2320,7 @@ OutputType CWallet::TransactionChangeType(const std::optional<OutputType>& chang
|
||||
void CWallet::CommitTransaction(CTransactionRef tx, mapValue_t mapValue, std::vector<std::pair<std::string, std::string>> orderForm)
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
WalletLogPrintf("CommitTransaction:\n%s", tx->ToString());
|
||||
WalletLogPrintf("CommitTransaction:\n%s", tx->ToString()); // NOLINT(bitcoin-unterminated-logprintf)
|
||||
|
||||
// Add tx to wallet, because if it has change it's also ours,
|
||||
// otherwise just for transaction history.
|
||||
|
||||
Reference in New Issue
Block a user