Skip to content

Commit b5a762a

Browse files
committed
wallet: improve {LoadActive,Deactivate}ScriptPubKeyMan log
1 parent 7d3817b commit b5a762a

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
@@ -3476,7 +3476,7 @@ void CWallet::LoadActiveScriptPubKeyMan(uint256 id, OutputType type, bool intern
34763476
// Legacy wallets have only one ScriptPubKeyManager and it's active for all output and change types.
34773477
Assert(IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS));
34783478

3479-
WalletLogPrintf("Setting spkMan to active: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal));
3479+
WalletLogPrintf("Setting spkMan to active: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(type), internal ? "true" : "false");
34803480
auto& spk_mans = internal ? m_internal_spk_managers : m_external_spk_managers;
34813481
auto& spk_mans_other = internal ? m_external_spk_managers : m_internal_spk_managers;
34823482
auto spk_man = m_spk_managers.at(id).get();
@@ -3494,7 +3494,7 @@ void CWallet::DeactivateScriptPubKeyMan(uint256 id, OutputType type, bool intern
34943494
{
34953495
auto spk_man = GetScriptPubKeyMan(type, internal);
34963496
if (spk_man != nullptr && spk_man->GetID() == id) {
3497-
WalletLogPrintf("Deactivate spkMan: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal));
3497+
WalletLogPrintf("Deactivate spkMan: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(type), internal ? "true" : "false");
34983498
WalletBatch batch(GetDatabase());
34993499
if (!batch.EraseActiveScriptPubKeyMan(static_cast<uint8_t>(type), internal)) {
35003500
throw std::runtime_error(std::string(__func__) + ": erasing active ScriptPubKeyMan id failed");

0 commit comments

Comments
 (0)