MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetWalletDir

Function GetWalletDir

src/wallet/walletutil.cpp:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12namespace wallet {
13fs::path GetWalletDir()
14{
15 fs::path path;
16
17 if (gArgs.IsArgSet("-walletdir")) {
18 path = gArgs.GetPathArg("-walletdir");
19 if (!fs::is_directory(path)) {
20 // If the path specified doesn't exist, we return the deliberately
21 // invalid empty string.
22 path = "";
23 }
24 } else {
25 path = gArgs.GetDataDirNet();
26 // If a wallets directory exists, use that, otherwise default to GetDataDir
27 if (fs::is_directory(path / "wallets")) {
28 path /= "wallets";
29 }
30 }
31
32 return path;
33}
34
35WalletDescriptor GenerateWalletDescriptor(const CExtPubKey& master_key, const OutputType& addr_type, bool internal)
36{

Callers 8

RestoreWalletFunction · 0.85
GetWalletPathFunction · 0.85
MigrateToSQLiteMethod · 0.85
VerifyWalletsFunction · 0.85
getWalletDirMethod · 0.85
listWalletDirMethod · 0.85
listwalletdirFunction · 0.85

Calls 3

IsArgSetMethod · 0.80
GetPathArgMethod · 0.80
GetDataDirNetMethod · 0.80

Tested by

no test coverage detected