From 0c8e72847603540bb29b8b8aeb80fa3f2e3a2c9a Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 2 Jan 2024 16:35:22 -0500 Subject: wallet: implement BerkeleyROBatch Implement ReadKey and HasKey of BerkeleyROBatch, and Next of BerkeleyROCursor. Also adds the containers for records to BerkeleyRODatabase so that BerkeleyROBatch will be able to access the records. --- src/wallet/db.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wallet/db.cpp') diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index ea06767e9b..a5a5f8ec6f 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -16,6 +16,9 @@ #include namespace wallet { +bool operator<(BytePrefix a, Span b) { return a.prefix < b.subspan(0, std::min(a.prefix.size(), b.size())); } +bool operator<(Span a, BytePrefix b) { return a.subspan(0, std::min(a.size(), b.prefix.size())) < b.prefix; } + std::vector ListDatabases(const fs::path& wallet_dir) { std::vector paths; -- cgit v1.2.3