aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-08-26 13:18:04 -0400
committerAndrew Chow <github@achow101.com>2022-08-29 17:30:38 -0400
commite7b16f925ae5b117e8b74ce814b63e19b19b50f4 (patch)
tree49d42195c832c044a4a714c4776a147be362a439 /src/wallet/wallet.h
parent5b62f095e790a0d4e2a70ece89465b64fc68358a (diff)
downloadbitcoin-e7b16f925ae5b117e8b74ce814b63e19b19b50f4.tar.xz
Implement MigrateToSQLite
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index d1876dda70..45391c20d7 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -316,7 +316,7 @@ private:
std::string m_name;
/** Internal database handle. */
- std::unique_ptr<WalletDatabase> const m_database;
+ std::unique_ptr<WalletDatabase> m_database;
/**
* The following is used to keep track of how far behind the wallet is
@@ -920,6 +920,13 @@ public:
//! Add a descriptor to the wallet, return a ScriptPubKeyMan & associated output type
ScriptPubKeyMan* AddWalletDescriptor(WalletDescriptor& desc, const FlatSigningProvider& signing_provider, const std::string& label, bool internal) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+
+ /** Move all records from the BDB database to a new SQLite database for storage.
+ * The original BDB file will be deleted and replaced with a new SQLite file.
+ * A backup is not created.
+ * May crash if something unexpected happens in the filesystem.
+ */
+ bool MigrateToSQLite(bilingual_str& error) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
};
/**