mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
wallet: bdb: move TxnBegin to cpp file since it uses a bdb function
This commit is contained in:
@@ -462,6 +462,15 @@ void BerkeleyEnvironment::ReloadDbEnv()
|
||||
Open(open_err);
|
||||
}
|
||||
|
||||
DbTxn* BerkeleyEnvironment::TxnBegin(int flags)
|
||||
{
|
||||
DbTxn* ptxn = nullptr;
|
||||
int ret = dbenv->txn_begin(nullptr, &ptxn, flags);
|
||||
if (!ptxn || ret != 0)
|
||||
return nullptr;
|
||||
return ptxn;
|
||||
}
|
||||
|
||||
bool BerkeleyDatabase::Rewrite(const char* pszSkip)
|
||||
{
|
||||
while (true) {
|
||||
|
||||
@@ -67,14 +67,7 @@ public:
|
||||
void CloseDb(const fs::path& filename);
|
||||
void ReloadDbEnv();
|
||||
|
||||
DbTxn* TxnBegin(int flags)
|
||||
{
|
||||
DbTxn* ptxn = nullptr;
|
||||
int ret = dbenv->txn_begin(nullptr, &ptxn, flags);
|
||||
if (!ptxn || ret != 0)
|
||||
return nullptr;
|
||||
return ptxn;
|
||||
}
|
||||
DbTxn* TxnBegin(int flags);
|
||||
};
|
||||
|
||||
/** Get BerkeleyEnvironment given a directory path. */
|
||||
|
||||
Reference in New Issue
Block a user