From f13a081e311e7845d9e2bf3568b9a5514022ba11 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 11 Aug 2016 12:04:33 -0700 Subject: [PATCH] wallet: add public method to expose the database --- wallet/wallet.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wallet/wallet.go b/wallet/wallet.go index 042c5b0..6411f0a 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -2070,6 +2070,13 @@ func (w *Wallet) ChainParams() *chaincfg.Params { return w.chainParams } +// Database returns the underlying walletdb database. This method is provided +// in order to allow applications wrapping btcwallet to store app-specific data +// with the wallet's database. +func (w *Wallet) Database() walletdb.DB { + return w.db +} + // Create creates an new wallet, writing it to an empty database. If the passed // seed is non-nil, it is used. Otherwise, a secure random seed of the // recommended length is generated.