wallet: bdb: move TxnBegin to cpp file since it uses a bdb function

This commit is contained in:
Cory Fields committed 2023-07-06 20:16:55 +00:00
1 parent 43369f3706
commit 4216f69250
2 files changed
+10 -8

No files matched your search

+9
View File
@@ -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) {
+1 -8
View File
@@ -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. */