Skip to content

Commit

Permalink
wallet: Create a SilentPaymentsSPKM by default
Browse files Browse the repository at this point in the history
  • Loading branch information
achow101 committed Aug 29, 2023
1 parent 958d9a6 commit 73190c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3727,6 +3727,13 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
master_key.SetSeed(seed_key);

SetupDescriptorScriptPubKeyMans(master_key);

// Also setup a SilentPaymentsSPKM
auto sp_spkm = std::unique_ptr<SilentPaymentsSPKM>(new SilentPaymentsSPKM(*this, m_keypool_size, master_key));
uint256 id = sp_spkm->GetID();
AddScriptPubKeyMan(id, std::move(sp_spkm));
AddActiveScriptPubKeyMan(id, OutputType::SILENT_PAYMENT, /*internal=*/false);
AddActiveScriptPubKeyMan(id, OutputType::SILENT_PAYMENT, /*internal=*/true);
} else {
ExternalSigner signer = ExternalSignerScriptPubKeyMan::GetExternalSigner();

Expand Down

0 comments on commit 73190c1

Please sign in to comment.