From 73aa40f00e291952460b3e68a0d62672656b5857 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 15 Jul 2021 10:34:27 +0200 Subject: [PATCH] lnwallet+kvdb: remove duplicate bdb backend imports We only want to register the bbolt DB backend ("bdb") when we're not compiling for a JS/WASM build targets. That's why we want to have that import in only one file that we can add a build tag to. We remove it in two other places since only one import is enough anyway. --- kvdb/interface.go | 1 - lnwallet/btcwallet/config.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/kvdb/interface.go b/kvdb/interface.go index 616e6317..a54a94d8 100644 --- a/kvdb/interface.go +++ b/kvdb/interface.go @@ -2,7 +2,6 @@ package kvdb import ( "github.com/btcsuite/btcwallet/walletdb" - _ "github.com/btcsuite/btcwallet/walletdb/bdb" // Import to register backend. ) // Update opens a database read/write transaction and executes the function f diff --git a/lnwallet/btcwallet/config.go b/lnwallet/btcwallet/config.go index d8983267..a69217ea 100644 --- a/lnwallet/btcwallet/config.go +++ b/lnwallet/btcwallet/config.go @@ -9,12 +9,6 @@ import ( "github.com/btcsuite/btcwallet/chain" "github.com/btcsuite/btcwallet/wallet" - - // This is required to register bdb as a valid walletdb driver. In the - // init function of the package, it registers itself. The import is used - // to activate the side effects w/o actually binding the package name to - // a file-level variable. - _ "github.com/btcsuite/btcwallet/walletdb/bdb" ) var (