From d6998ed30618ca376c75ecadb9b9af1f5e8639d2 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 13 Dec 2017 02:08:22 -0800 Subject: [PATCH] peer_test: move log disable to init() --- peer_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/peer_test.go b/peer_test.go index 0e71a3a0..ff6eb70a 100644 --- a/peer_test.go +++ b/peer_test.go @@ -17,7 +17,7 @@ import ( "github.com/roasbeef/btcutil" ) -func disablePeerLogger(t *testing.T) { +func init() { peerLog = btclog.Disabled srvrLog = btclog.Disabled lnwallet.UseLogger(btclog.Disabled) @@ -28,7 +28,6 @@ func disablePeerLogger(t *testing.T) { // TestPeerChannelClosureAcceptFeeResponder tests the shutdown responder's // behavior if we can agree on the fee immediately. func TestPeerChannelClosureAcceptFeeResponder(t *testing.T) { - disablePeerLogger(t) t.Parallel() notifier := &mockNotfier{ @@ -118,7 +117,6 @@ func TestPeerChannelClosureAcceptFeeResponder(t *testing.T) { // TestPeerChannelClosureAcceptFeeInitiator tests the shutdown initiator's // behavior if we can agree on the fee immediately. func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) { - disablePeerLogger(t) t.Parallel() notifier := &mockNotfier{ @@ -228,7 +226,6 @@ func TestPeerChannelClosureAcceptFeeInitiator(t *testing.T) { // responder's behavior in the case where we must do several rounds of fee // negotiation before we agree on a fee. func TestPeerChannelClosureFeeNegotiationsResponder(t *testing.T) { - disablePeerLogger(t) t.Parallel() notifier := &mockNotfier{ @@ -409,7 +406,6 @@ func TestPeerChannelClosureFeeNegotiationsResponder(t *testing.T) { // initiator's behavior in the case where we must do several rounds of fee // negotiation before we agree on a fee. func TestPeerChannelClosureFeeNegotiationsInitiator(t *testing.T) { - disablePeerLogger(t) t.Parallel() notifier := &mockNotfier{