Bitcoin Core  21.99.0
P2P Digital Currency
Functions
bdb.cpp File Reference
#include <wallet/bdb.h>
#include <wallet/db.h>
#include <util/strencodings.h>
#include <util/translation.h>
#include <stdint.h>
#include <sys/stat.h>
Include dependency graph for bdb.cpp:

Go to the source code of this file.

Functions

std::shared_ptr< BerkeleyEnvironmentGetBerkeleyEnv (const fs::path &env_directory)
 Get BerkeleyEnvironment given a directory path. More...
 
bool BerkeleyDatabaseSanityCheck ()
 Perform sanity check of runtime BDB version versus linked BDB version. More...
 
std::string BerkeleyDatabaseVersion ()
 
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

◆ BerkeleyDatabaseSanityCheck()

bool BerkeleyDatabaseSanityCheck ( )

Perform sanity check of runtime BDB version versus linked BDB version.

Definition at line 726 of file bdb.cpp.

Here is the caller graph for this function:

◆ BerkeleyDatabaseVersion()

std::string BerkeleyDatabaseVersion ( )

Definition at line 743 of file bdb.cpp.

Here is the caller graph for this function:

◆ GetBerkeleyEnv()

std::shared_ptr<BerkeleyEnvironment> GetBerkeleyEnv ( const fs::path &  env_directory)

Get BerkeleyEnvironment given a directory path.

Parameters
[in]env_directoryPath to environment directory
Returns
A shared pointer to the BerkeleyEnvironment object for the wallet directory, never empty because ~BerkeleyEnvironment erases the weak pointer from the g_dbenvs map.
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 61 of file bdb.cpp.

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 825 of file bdb.cpp.

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