aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-16 20:43:44 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-16 21:39:17 +0200
commit4cfe17c3382ba750131cdc8703b2978132822070 (patch)
treebf15aa1ddb8796a01210cedd77a7505f61336c65 /src/wallet/wallet.h
parent11e7bdfd903ef342c0ff2dcd062d6eab8dd25350 (diff)
parentcd53981b3d0d4697ed46c7bedbf10f464aca4ccc (diff)
downloadbitcoin-4cfe17c3382ba750131cdc8703b2978132822070.tar.xz
Merge #10740: [wallet] `loadwallet` RPC - load wallet at runtime
cd53981 [docs] Add release notes for `loadwallet` RPC. (John Newbery) a46aeb6 [wallet] [tests] Test loadwallet (John Newbery) 5d15260 [wallet] [rpc] Add loadwallet RPC (John Newbery) 876eb64 [wallet] Pass error message back from CWallet::Verify() (John Newbery) e0e90db [wallet] Add CWallet::Verify function (John Newbery) 470316c [wallet] setup wallet background flushing in WalletInit directly (John Newbery) 59b87a2 [wallet] Fix potential memory leak in CreateWalletFromFile (John Newbery) Pull request description: Adds a `loadwallet` RPCs. This allows wallets to be loaded dynamically during runtime without having to stop-start the node with new `-wallet` params. Includes functional tests and release notes. Limitations: - currently this functionality is only available through the RPC interface. - wallets loaded in this way will not be displayed in the GUI. Tree-SHA512: f80dfe32b77f5c97ea3732ac538de7d6ed7e7cd0413c2ec91096bb652ad9bccf05d847ddbe81e7cd3cd44eb8030a51a5f00083871228b1b9b0b8398994f6f9f1
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 1e23b44eae..fecc2178e4 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -68,7 +68,6 @@ class CCoinControl;
class COutput;
class CReserveKey;
class CScript;
-class CScheduler;
class CTxMemPool;
class CBlockPolicyEstimator;
class CWalletTx;
@@ -675,7 +674,6 @@ class WalletRescanReserver; //forward declarations for ScanForWalletTransactions
class CWallet final : public CCryptoKeyStore, public CValidationInterface
{
private:
- static std::atomic<bool> fFlushScheduled;
std::atomic<bool> fAbortRescan{false};
std::atomic<bool> fScanningWallet{false}; // controlled by WalletRescanReserver
std::mutex mutexScanning;
@@ -1120,6 +1118,9 @@ public:
/** Mark a transaction as replaced by another transaction (e.g., BIP 125). */
bool MarkReplaced(const uint256& originalHash, const uint256& newHash);
+ //! Verify wallet naming and perform salvage on the wallet if required
+ static bool Verify(std::string wallet_file, bool salvage_wallet, std::string& error_string, std::string& warning_string);
+
/* Initializes the wallet, returns a new CWallet instance or a null pointer in case of an error */
static CWallet* CreateWalletFromFile(const std::string& name, const fs::path& path);
@@ -1127,7 +1128,7 @@ public:
* Wallet post-init setup
* Gives the wallet a chance to register repetitive tasks and complete post-init tasks
*/
- void postInitProcess(CScheduler& scheduler);
+ void postInitProcess();
bool BackupWallet(const std::string& strDest);