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 committed 2023-07-07 14:14:20 +00:00
1 parent 4216f69250
commit e5e5aa1da2
1 file changed
+5 -4
+5 -4
View File
@@ -31,10 +31,6 @@
namespace wallet { namespace wallet {
namespace { 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 //! 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 //! 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; 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) bool BerkeleyDatabase::Verify(bilingual_str& errorStr)
{ {
fs::path walletDir = env->Directory(); fs::path walletDir = env->Directory();