@@ -2,6 +2,7 @@ package sweepbatcher
22
33import (
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"
@@ -683,7 +685,14 @@ func (b *Batcher) PresignSweepsGroup(ctx context.Context, inputs []Input,
683685 if err != nil {
684686 return fmt .Errorf ("failed to get nextBlockFeeRate: %w" , err )
685687 }
686- infof ("PresignSweepsGroup: nextBlockFeeRate is %v" , nextBlockFeeRate )
688+ destPkscript , err := txscript .PayToAddrScript (destAddress )
689+ if err != nil {
690+ return fmt .Errorf ("txscript.PayToAddrScript failed: %w" , err )
691+ }
692+ infof ("PresignSweepsGroup: nextBlockFeeRate is %v, inputs: %v, " +
693+ "destAddress: %v, destPkscript: %v sweepTimeout: %d" ,
694+ nextBlockFeeRate , inputs , destAddress ,
695+ hex .EncodeToString (destPkscript ), sweepTimeout )
687696
688697 sweeps := make ([]sweep , len (inputs ))
689698 for i , input := range inputs {
0 commit comments