Skip to content

Commit 4216f69

Browse files
committed
wallet: bdb: move TxnBegin to cpp file since it uses a bdb function
1 parent 43369f3 commit 4216f69

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/wallet/bdb.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,15 @@ void BerkeleyEnvironment::ReloadDbEnv()
462462
Open(open_err);
463463
}
464464

465+
DbTxn* BerkeleyEnvironment::TxnBegin(int flags)
466+
{
467+
DbTxn* ptxn = nullptr;
468+
int ret = dbenv->txn_begin(nullptr, &ptxn, flags);
469+
if (!ptxn || ret != 0)
470+
return nullptr;
471+
return ptxn;
472+
}
473+
465474
bool BerkeleyDatabase::Rewrite(const char* pszSkip)
466475
{
467476
while (true) {

src/wallet/bdb.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,7 @@ class BerkeleyEnvironment
6767
void CloseDb(const fs::path& filename);
6868
void ReloadDbEnv();
6969

70-
DbTxn* TxnBegin(int flags)
71-
{
72-
DbTxn* ptxn = nullptr;
73-
int ret = dbenv->txn_begin(nullptr, &ptxn, flags);
74-
if (!ptxn || ret != 0)
75-
return nullptr;
76-
return ptxn;
77-
}
70+
DbTxn* TxnBegin(int flags);
7871
};
7972

8073
/** Get BerkeleyEnvironment given a directory path. */

0 commit comments

Comments
 (0)