Skip to content

Commit 6e01062

Browse files
committed
wallet: bdb: don't use bdb define in header
1 parent 004b184 commit 6e01062

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/wallet/bdb.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#endif
3030
#endif
3131

32+
static_assert(BDB_DB_FILE_ID_LEN == DB_FILE_ID_LEN, "DB_FILE_ID_LEN should be 20.");
33+
3234
namespace wallet {
3335
namespace {
3436

src/wallet/bdb.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525

2626
struct bilingual_str;
2727

28+
// This constant was introduced in BDB 4.0.14 and has never changed, but there
29+
// is a belt-and-suspenders check in the cpp file just in case.
30+
#define BDB_DB_FILE_ID_LEN 20 /* Unique file ID length. */
31+
2832
namespace wallet {
2933

3034
struct WalletDatabaseFileId {
31-
uint8_t value[DB_FILE_ID_LEN];
35+
uint8_t value[BDB_DB_FILE_ID_LEN];
3236
bool operator==(const WalletDatabaseFileId& rhs) const;
3337
};
3438

0 commit comments

Comments
 (0)