When the building of db_tests.cpp
was made conditional on USE_BDB
in commit a58b719cf75e2d97205ec260bcff0d4780fe4fb8, all db_tests
were indeed specific to BDB wallets.
However, the tests have since been extended to include SQLite wallets as well.
On the master branch @ 433412fd8478923dfdb20044f74c5d1e19fa8dd8, tests specific to SQLite wallets are not built and run if configured with WITH_BDB=OFF
(the default option).
This PR resolves this issue by guarding BDB-specific code in db_tests.cpp
and ensuring this source file is compiled regardless of the WITH_BDB
option.