From 12e51b3c06fcd2b68d419ddda7a4d995865d4ce7 Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Sat, 23 Oct 2021 15:00:09 +0200 Subject: [PATCH] [wallet] Expose an immutable reference to a wallet's database --- src/wallet/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index b8d1196d..b811662b 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1447,6 +1447,11 @@ where Ok(()) } + + /// Return an immutable reference to the internal database + pub fn database(&self) -> impl std::ops::Deref + '_ { + self.database.borrow() + } } impl Wallet