From: Alekos Filini Date: Sat, 23 Oct 2021 13:00:09 +0000 (+0200) Subject: [wallet] Expose an immutable reference to a wallet's database X-Git-Tag: v0.14.0~9 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CodeLengthError.html?a=commitdiff_plain;h=12e51b3c06fcd2b68d419ddda7a4d995865d4ce7;p=bdk [wallet] Expose an immutable reference to a wallet's database --- 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