wallet: bdb: move TxnBegin to cpp file since it uses a bdb function
This commit is contained in:
1 parent
43369f3706
commit
4216f69250
2 files changed
+10
-8
No files matched your search
@@ -462,6 +462,15 @@ void BerkeleyEnvironment::ReloadDbEnv()
|
|||||||
Open(open_err);
|
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)
|
bool BerkeleyDatabase::Rewrite(const char* pszSkip)
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|||||||
+1
-8
@@ -67,14 +67,7 @@ public:
|
|||||||
void CloseDb(const fs::path& filename);
|
void CloseDb(const fs::path& filename);
|
||||||
void ReloadDbEnv();
|
void ReloadDbEnv();
|
||||||
|
|
||||||
DbTxn* TxnBegin(int flags)
|
DbTxn* TxnBegin(int flags);
|
||||||
{
|
|
||||||
DbTxn* ptxn = nullptr;
|
|
||||||
int ret = dbenv->txn_begin(nullptr, &ptxn, flags);
|
|
||||||
if (!ptxn || ret != 0)
|
|
||||||
return nullptr;
|
|
||||||
return ptxn;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Get BerkeleyEnvironment given a directory path. */
|
/** Get BerkeleyEnvironment given a directory path. */
|
||||||
|
|||||||
Reference in new issue
Block a user