aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.cpp
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-08-25 14:35:28 -0400
committerAndrew Chow <github@achow101.com>2022-08-26 13:14:51 -0400
commit22401f17e026ead4bc3fe96967eec56a719a4f75 (patch)
treeaf171262e7a0b0e5dc5935459660fe7a23fc27f7 /src/wallet/scriptpubkeyman.cpp
parent35f428fae68ad974abdce0fa905148f620a9443c (diff)
downloadbitcoin-22401f17e026ead4bc3fe96967eec56a719a4f75.tar.xz
Implement LegacyScriptPubKeyMan::DeleteRecords
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r--src/wallet/scriptpubkeyman.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index 3e6830a08d..41654579c6 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -1964,6 +1964,13 @@ std::optional<MigrationData> LegacyScriptPubKeyMan::MigrateToDescriptor()
return out;
}
+bool LegacyScriptPubKeyMan::DeleteRecords()
+{
+ LOCK(cs_KeyStore);
+ WalletBatch batch(m_storage.GetDatabase());
+ return batch.EraseRecords(DBKeys::LEGACY_TYPES);
+}
+
util::Result<CTxDestination> DescriptorScriptPubKeyMan::GetNewDestination(const OutputType type)
{
// Returns true if this descriptor supports getting new addresses. Conditions where we may be unable to fetch them (e.g. locked) are caught later