mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 5a95c5179c into merged_master (Bitcoin PR bitcoin/bitcoin#20191)
This broke functional tests; had to forward-port #22379 (which will be merged in a couple PRs) to fix it.
This commit is contained in:
commit
59bf2ee204
4 changed files with 21 additions and 42 deletions
|
|
@ -1620,12 +1620,10 @@ std::set<CKeyID> LegacyScriptPubKeyMan::GetKeys() const
|
|||
return set_address;
|
||||
}
|
||||
|
||||
void LegacyScriptPubKeyMan::SetInternal(bool internal) {}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::GetNewDestination(const OutputType type, CTxDestination& dest, std::string& error)
|
||||
{
|
||||
// Returns true if this descriptor supports getting new addresses. Conditions where we may be unable to fetch them (e.g. locked) are caught later
|
||||
if (!CanGetAddresses(m_internal)) {
|
||||
if (!CanGetAddresses()) {
|
||||
error = "No addresses available";
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1883,7 +1881,7 @@ bool DescriptorScriptPubKeyMan::AddDescriptorKeyWithDB(WalletBatch& batch, const
|
|||
}
|
||||
}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_key, OutputType addr_type)
|
||||
bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_key, OutputType addr_type, bool internal)
|
||||
{
|
||||
if (addr_type == OutputType::BECH32M) {
|
||||
// Don't allow setting up taproot descriptors yet
|
||||
|
|
@ -1931,7 +1929,7 @@ bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_
|
|||
desc_prefix += "/0'";
|
||||
}
|
||||
|
||||
std::string internal_path = m_internal ? "/1" : "/0";
|
||||
std::string internal_path = internal ? "/1" : "/0";
|
||||
std::string desc_str = desc_prefix + "/0'" + internal_path + desc_suffix;
|
||||
|
||||
// Make the descriptor
|
||||
|
|
@ -1986,13 +1984,6 @@ int64_t DescriptorScriptPubKeyMan::GetOldestKeyPoolTime() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
size_t DescriptorScriptPubKeyMan::KeypoolCountExternalKeys() const
|
||||
{
|
||||
if (m_internal) {
|
||||
return 0;
|
||||
}
|
||||
return GetKeyPoolSize();
|
||||
}
|
||||
|
||||
unsigned int DescriptorScriptPubKeyMan::GetKeyPoolSize() const
|
||||
{
|
||||
|
|
@ -2194,11 +2185,6 @@ uint256 DescriptorScriptPubKeyMan::GetID() const
|
|||
return id;
|
||||
}
|
||||
|
||||
void DescriptorScriptPubKeyMan::SetInternal(bool internal)
|
||||
{
|
||||
this->m_internal = internal;
|
||||
}
|
||||
|
||||
void DescriptorScriptPubKeyMan::SetCache(const DescriptorCache& cache)
|
||||
{
|
||||
LOCK(cs_desc_man);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue