diff options
author | Andrew Chow <github@achow101.com> | 2022-08-25 14:35:28 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-08-26 13:14:51 -0400 |
commit | 22401f17e026ead4bc3fe96967eec56a719a4f75 (patch) | |
tree | af171262e7a0b0e5dc5935459660fe7a23fc27f7 /src/wallet/scriptpubkeyman.cpp | |
parent | 35f428fae68ad974abdce0fa905148f620a9443c (diff) |
Implement LegacyScriptPubKeyMan::DeleteRecords
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 7 |
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 |