loopout_test: enable logging in sweepbatcher

This commit is contained in:
Boris Nagaev 2024-07-15 14:44:25 -03:00
parent 026cf0d47a
commit 7a61d5e743
No known key found for this signature in database

View file

@ -4,6 +4,7 @@ import (
"context"
"errors"
"math"
"os"
"testing"
"time"
@ -11,6 +12,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btclog"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop/loopdb"
"github.com/lightninglabs/loop/sweep"
@ -255,6 +257,11 @@ func TestCustomSweepConfTarget(t *testing.T) {
func testCustomSweepConfTarget(t *testing.T) {
defer test.Guard(t)()
// Setup logger for sweepbatcher.
logger := btclog.NewBackend(os.Stdout).Logger("SWEEP")
logger.SetLevel(btclog.LevelTrace)
sweepbatcher.UseLogger(logger)
lnd := test.NewMockLnd()
ctx := test.NewContext(t, lnd)
server := newServerMock(lnd)