Skip to content

Commit e5e5aa1

Browse files
committed
wallet: bdb: move SpanFromDbt to below SafeDbt's implementation
No functional change, just simplifies the code move in the next commit.
1 parent 4216f69 commit e5e5aa1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/wallet/bdb.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131

3232
namespace wallet {
3333
namespace {
34-
Span<const std::byte> SpanFromDbt(const SafeDbt& dbt)
35-
{
36-
return {reinterpret_cast<const std::byte*>(dbt.get_data()), dbt.get_size()};
37-
}
3834

3935
//! Make sure database has a unique fileid within the environment. If it
4036
//! doesn't, throw an error. BDB caches do not work properly when more than one
@@ -275,6 +271,11 @@ SafeDbt::operator Dbt*()
275271
return &m_dbt;
276272
}
277273

274+
static Span<const std::byte> SpanFromDbt(const SafeDbt& dbt)
275+
{
276+
return {reinterpret_cast<const std::byte*>(dbt.get_data()), dbt.get_size()};
277+
}
278+
278279
bool BerkeleyDatabase::Verify(bilingual_str& errorStr)
279280
{
280281
fs::path walletDir = env->Directory();

0 commit comments

Comments
 (0)