mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge a478c5350a into merged_master (Bitcoin PR bitcoin/bitcoin#25790)
This commit is contained in:
commit
31269c3653
1 changed files with 2 additions and 2 deletions
|
|
@ -3868,7 +3868,7 @@ void CWallet::LoadActiveScriptPubKeyMan(uint256 id, OutputType type, bool intern
|
|||
// Legacy wallets have only one ScriptPubKeyManager and it's active for all output and change types.
|
||||
Assert(IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS));
|
||||
|
||||
WalletLogPrintf("Setting spkMan to active: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal));
|
||||
WalletLogPrintf("Setting spkMan to active: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(type), internal ? "true" : "false");
|
||||
auto& spk_mans = internal ? m_internal_spk_managers : m_external_spk_managers;
|
||||
auto& spk_mans_other = internal ? m_external_spk_managers : m_internal_spk_managers;
|
||||
auto spk_man = m_spk_managers.at(id).get();
|
||||
|
|
@ -3886,7 +3886,7 @@ void CWallet::DeactivateScriptPubKeyMan(uint256 id, OutputType type, bool intern
|
|||
{
|
||||
auto spk_man = GetScriptPubKeyMan(type, internal);
|
||||
if (spk_man != nullptr && spk_man->GetID() == id) {
|
||||
WalletLogPrintf("Deactivate spkMan: id = %s, type = %d, internal = %d\n", id.ToString(), static_cast<int>(type), static_cast<int>(internal));
|
||||
WalletLogPrintf("Deactivate spkMan: id = %s, type = %s, internal = %s\n", id.ToString(), FormatOutputType(type), internal ? "true" : "false");
|
||||
WalletBatch batch(GetDatabase());
|
||||
if (!batch.EraseActiveScriptPubKeyMan(static_cast<uint8_t>(type), internal)) {
|
||||
throw std::runtime_error(std::string(__func__) + ": erasing active ScriptPubKeyMan id failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue