wallet: bdb: move SpanFromDbt to below SafeDbt's implementation

No functional change, just simplifies the code move in the next commit.
This commit is contained in:
Cory Fields 2023-07-06 18:32:24 +00:00
parent 4216f69250
commit e5e5aa1da2

View File

@ -31,10 +31,6 @@
namespace wallet {
namespace {
Span<const std::byte> SpanFromDbt(const SafeDbt& dbt)
{
return {reinterpret_cast<const std::byte*>(dbt.get_data()), dbt.get_size()};
}
//! Make sure database has a unique fileid within the environment. If it
//! doesn't, throw an error. BDB caches do not work properly when more than one
@ -275,6 +271,11 @@ SafeDbt::operator Dbt*()
return &m_dbt;
}
static Span<const std::byte> SpanFromDbt(const SafeDbt& dbt)
{
return {reinterpret_cast<const std::byte*>(dbt.get_data()), dbt.get_size()};
}
bool BerkeleyDatabase::Verify(bilingual_str& errorStr)
{
fs::path walletDir = env->Directory();