From e5e5aa1da261633c8f73b97d5aefe5dc450a7db9 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Thu, 6 Jul 2023 18:32:24 +0000 Subject: [PATCH] wallet: bdb: move SpanFromDbt to below SafeDbt's implementation No functional change, just simplifies the code move in the next commit. --- src/wallet/bdb.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index e08391547ad..4d410fa39e5 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -31,10 +31,6 @@ namespace wallet { namespace { -Span SpanFromDbt(const SafeDbt& dbt) -{ - return {reinterpret_cast(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 SpanFromDbt(const SafeDbt& dbt) +{ + return {reinterpret_cast(dbt.get_data()), dbt.get_size()}; +} + bool BerkeleyDatabase::Verify(bilingual_str& errorStr) { fs::path walletDir = env->Directory();