wallet: bdb: include bdb header from our implementation files only

This way the dependency can't sneak into other files without being noticed.

Forward-declare bdb classes as necessary.
This commit is contained in:
Cory Fields 2023-07-06 19:12:28 +00:00
parent 6e010626af
commit 8b5397c00e
3 changed files with 8 additions and 2 deletions

View file

@ -18,6 +18,7 @@
#include <stdint.h>
#include <db_cxx.h>
#include <sys/stat.h>
// Windows may not define S_IRUSR or S_IWUSR. We define both

View file

@ -21,10 +21,13 @@
#include <unordered_map>
#include <vector>
#include <db_cxx.h>
struct bilingual_str;
class DbEnv;
class DbTxn;
class Db;
class Dbc;
// This constant was introduced in BDB 4.0.14 and has never changed, but there
// is a belt-and-suspenders check in the cpp file just in case.
#define BDB_DB_FILE_ID_LEN 20 /* Unique file ID length. */

View file

@ -11,6 +11,8 @@
#include <wallet/wallet.h>
#include <wallet/walletdb.h>
#include <db_cxx.h>
namespace wallet {
/* End of headers, beginning of key/value data */
static const char *HEADER_END = "HEADER=END";