Skip to content

Commit 82413c8

Browse files
committed
merge bitcoin#25790: improve {LoadActive,Deactivate}ScriptPubKeyMan log
1 parent 4f44f2b commit 82413c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3878,7 +3878,7 @@ void CWallet::LoadActiveScriptPubKeyMan(uint256 id, bool internal)
38783878
// Legacy wallets have only one ScriptPubKeyManager and it's active for all output and change types.
38793879
Assert(IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS));
38803880

3881-
WalletLogPrintf("Setting spkMan to active: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(OutputType::LEGACY), static_cast<int>(internal));
3881+
WalletLogPrintf("Setting spkMan to active: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(OutputType::LEGACY), internal ? "true" : "false");
38823882
auto& spk_mans = internal ? m_internal_spk_managers : m_external_spk_managers;
38833883
auto& spk_mans_other = internal ? m_external_spk_managers : m_internal_spk_managers;
38843884
auto spk_man = m_spk_managers.at(id).get();
@@ -3896,7 +3896,7 @@ void CWallet::DeactivateScriptPubKeyMan(uint256 id, bool internal)
38963896
{
38973897
auto spk_man = GetScriptPubKeyMan(internal);
38983898
if (spk_man != nullptr && spk_man->GetID() == id) {
3899-
WalletLogPrintf("Deactivate spkMan: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(OutputType::LEGACY), static_cast<int>(internal));
3899+
WalletLogPrintf("Deactivate spkMan: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(OutputType::LEGACY), internal ? "true" : "false");
39003900
WalletBatch batch(GetDatabase());
39013901
if (!batch.EraseActiveScriptPubKeyMan(internal)) {
39023902
throw std::runtime_error(std::string(__func__) + ": erasing active ScriptPubKeyMan id failed");

0 commit comments

Comments
 (0)