Skip to content

Commit 1813952

Browse files
committed
sweepbatcher: more logging in PresignSweepsGroup
1 parent 3646900 commit 1813952

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sweepbatcher/sweep_batcher.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sweepbatcher
22

33
import (
44
"context"
5+
"encoding/hex"
56
"errors"
67
"fmt"
78
"strings"
@@ -12,6 +13,7 @@ import (
1213
"github.com/btcsuite/btcd/btcutil"
1314
"github.com/btcsuite/btcd/chaincfg"
1415
"github.com/btcsuite/btcd/chaincfg/chainhash"
16+
"github.com/btcsuite/btcd/txscript"
1517
"github.com/btcsuite/btcd/wire"
1618
"github.com/btcsuite/btclog/v2"
1719
"github.com/btcsuite/btcwallet/chain"
@@ -698,7 +700,14 @@ func (b *Batcher) PresignSweepsGroup(ctx context.Context, inputs []Input,
698700
if err != nil {
699701
return fmt.Errorf("failed to get nextBlockFeeRate: %w", err)
700702
}
701-
infof("PresignSweepsGroup: nextBlockFeeRate is %v", nextBlockFeeRate)
703+
destPkscript, err := txscript.PayToAddrScript(destAddress)
704+
if err != nil {
705+
return fmt.Errorf("txscript.PayToAddrScript failed: %w", err)
706+
}
707+
infof("PresignSweepsGroup: nextBlockFeeRate is %v, inputs: %v, "+
708+
"destAddress: %v, destPkscript: %v sweepTimeout: %d",
709+
nextBlockFeeRate, inputs, destAddress,
710+
hex.EncodeToString(destPkscript), sweepTimeout)
702711

703712
sweeps := make([]sweep, len(inputs))
704713
for i, input := range inputs {

0 commit comments

Comments
 (0)