diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2023-07-06 19:09:50 +0000 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2023-07-07 14:14:20 +0000 |
commit | 6e010626af7ed51f1748323ece2f46335e145f2f (patch) | |
tree | a7efd410835fc6025092db2c57d21fa6c4c4c3ca /src/wallet | |
parent | 004b184b027520a4f9019d1432a816e6ec891fe3 (diff) |
wallet: bdb: don't use bdb define in header
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/bdb.cpp | 2 | ||||
-rw-r--r-- | src/wallet/bdb.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index d74950c5b1..69a0201d4a 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -29,6 +29,8 @@ #endif #endif +static_assert(BDB_DB_FILE_ID_LEN == DB_FILE_ID_LEN, "DB_FILE_ID_LEN should be 20."); + namespace wallet { namespace { diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h index 0470a3183a..f9b0b7601d 100644 --- a/src/wallet/bdb.h +++ b/src/wallet/bdb.h @@ -25,10 +25,14 @@ struct bilingual_str; +// 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. */ + namespace wallet { struct WalletDatabaseFileId { - uint8_t value[DB_FILE_ID_LEN]; + uint8_t value[BDB_DB_FILE_ID_LEN]; bool operator==(const WalletDatabaseFileId& rhs) const; }; |