diff --git a/breacharbiter.go b/breacharbiter.go index 07fb5b25..df19bff1 100644 --- a/breacharbiter.go +++ b/breacharbiter.go @@ -15,6 +15,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" + "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/htlcswitch" diff --git a/breacharbiter_test.go b/breacharbiter_test.go index 8f6c90a3..31fc5a04 100644 --- a/breacharbiter_test.go +++ b/breacharbiter_test.go @@ -22,7 +22,6 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btclog" "github.com/btcsuite/btcutil" "github.com/go-errors/errors" "github.com/lightningnetwork/lnd/chainntnfs" @@ -268,10 +267,6 @@ var ( ) func init() { - channeldb.UseLogger(btclog.Disabled) - lnwallet.UseLogger(btclog.Disabled) - brarLog = btclog.Disabled - // Ensure that breached outputs are initialized before starting tests. if err := initBreachedOutputs(); err != nil { panic(err) diff --git a/fundingmanager.go b/fundingmanager.go index 55622e40..0acfadcf 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -15,6 +15,9 @@ import ( "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" "github.com/go-errors/errors" + "golang.org/x/crypto/salsa20" + "google.golang.org/grpc" + "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/htlcswitch" @@ -24,8 +27,6 @@ import ( "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing" - "golang.org/x/crypto/salsa20" - "google.golang.org/grpc" ) const ( diff --git a/fundingmanager_test.go b/fundingmanager_test.go index c1421575..2cfd8097 100644 --- a/fundingmanager_test.go +++ b/fundingmanager_test.go @@ -18,12 +18,10 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btclog" "github.com/btcsuite/btcutil" - _ "github.com/btcsuite/btcwallet/walletdb/bdb" + "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/htlcswitch" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnpeer" @@ -201,13 +199,6 @@ func (n *testNode) AddNewChannel(channel *channeldb.OpenChannel, } } -func init() { - channeldb.UseLogger(btclog.Disabled) - lnwallet.UseLogger(btclog.Disabled) - contractcourt.UseLogger(btclog.Disabled) - fndgLog = btclog.Disabled -} - func createTestWallet(cdb *channeldb.DB, netParams *chaincfg.Params, notifier chainntnfs.ChainNotifier, wc lnwallet.WalletController, signer lnwallet.Signer, keyRing keychain.SecretKeyRing, diff --git a/nursery_store_test.go b/nursery_store_test.go index 16723abb..4617e5e0 100644 --- a/nursery_store_test.go +++ b/nursery_store_test.go @@ -9,16 +9,9 @@ import ( "testing" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btclog" "github.com/lightningnetwork/lnd/channeldb" ) -func init() { - // Disable logging to prevent panics bc. of global state - channeldb.UseLogger(btclog.Disabled) - utxnLog = btclog.Disabled -} - // makeTestDB creates a new instance of the ChannelDB for testing purposes. A // callback which cleans up the created temporary directories is also returned // and intended to be executed after the test completes. diff --git a/peer.go b/peer.go index 2f7f5488..e95f30ee 100644 --- a/peer.go +++ b/peer.go @@ -16,6 +16,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/davecgh/go-spew/spew" + "github.com/lightningnetwork/lnd/brontide" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" diff --git a/peer_test.go b/peer_test.go index ffeb5951..86ba3c16 100644 --- a/peer_test.go +++ b/peer_test.go @@ -7,26 +7,14 @@ import ( "time" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btclog" "github.com/btcsuite/btcutil" "github.com/lightningnetwork/lnd/chainntnfs" - "github.com/lightningnetwork/lnd/channeldb" - "github.com/lightningnetwork/lnd/contractcourt" "github.com/lightningnetwork/lnd/htlcswitch" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" ) -func init() { - peerLog = btclog.Disabled - srvrLog = btclog.Disabled - lnwallet.UseLogger(btclog.Disabled) - htlcswitch.UseLogger(btclog.Disabled) - channeldb.UseLogger(btclog.Disabled) - contractcourt.UseLogger(btclog.Disabled) -} - // TestPeerChannelClosureAcceptFeeResponder tests the shutdown responder's // behavior if we can agree on the fee immediately. func TestPeerChannelClosureAcceptFeeResponder(t *testing.T) { diff --git a/utxonursery.go b/utxonursery.go index 71511ab2..8eed7cb5 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -13,6 +13,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/davecgh/go-spew/spew" + "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/lnwallet"