Bitcoin ABC 0.33.6
P2P Digital Currency
Functions
bdb.cpp File Reference
#include <wallet/bdb.h>
#include <wallet/db.h>
#include <common/args.h>
#include <compat/compat.h>
#include <logging.h>
#include <sync.h>
#include <util/fs.h>
#include <util/fs_helpers.h>
#include <util/strencodings.h>
#include <util/time.h>
#include <util/translation.h>
#include <cstdint>
#include <sys/stat.h>
Include dependency graph for bdb.cpp:

Go to the source code of this file.

Functions

std::shared_ptr< BerkeleyEnvironmentGetWalletEnv (const fs::path &wallet_path, std::string &database_filename)
 Get BerkeleyEnvironment and database filename given a wallet path. More...
 
std::string BerkeleyDatabaseVersion ()
 
bool ExistsBerkeleyDatabase (const fs::path &path)
 Check if Berkeley database exists at specified path. More...
 
std::unique_ptr< BerkeleyDatabaseMakeBerkeleyDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 Return object giving access to Berkeley database at specified path. More...
 

Function Documentation

◆ BerkeleyDatabaseVersion()

std::string BerkeleyDatabaseVersion ( )

Definition at line 811 of file bdb.cpp.

Here is the caller graph for this function:

◆ ExistsBerkeleyDatabase()

bool ExistsBerkeleyDatabase ( const fs::path path)

Check if Berkeley database exists at specified path.

Definition at line 897 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletEnv()

std::shared_ptr< BerkeleyEnvironment > GetWalletEnv ( const fs::path wallet_path,
std::string &  database_filename 
)

Get BerkeleyEnvironment and database filename given a wallet path.

Parameters
[in]wallet_pathPath to wallet directory. Or (for backwards compatibility only) a path to a berkeley btree data file inside a wallet directory.
[out]database_filenameFilename of berkeley btree data file inside the wallet directory.
Returns
A shared pointer to the BerkeleyEnvironment object for the wallet directory. May be a nullptr in rare cases if the wallet is in the process of being unloaded, its reference was already dropped but the BerkeleyEnvironment destructor is not yet done removing the environment from g_dbenvs.
Postcondition
A new BerkeleyEnvironment weak pointer is inserted into g_dbenvs if the directory path key was not already in the map.

Definition at line 86 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeBerkeleyDatabase()

std::unique_ptr< BerkeleyDatabase > MakeBerkeleyDatabase ( const fs::path path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Return object giving access to Berkeley database at specified path.

Definition at line 905 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: