From 2af18490d264d9ec5d21670dd8a4d6807629905b Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 13 Jun 2025 20:32:44 +0200 Subject: [PATCH] sweepremoteclose: add more info logging --- cmd/chantools/sweepremoteclosed.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/chantools/sweepremoteclosed.go b/cmd/chantools/sweepremoteclosed.go index 598bbfd..24f8675 100644 --- a/cmd/chantools/sweepremoteclosed.go +++ b/cmd/chantools/sweepremoteclosed.go @@ -347,7 +347,10 @@ func findTargetsCln(hsmSecret [32]byte, pubKeys []*btcec.PublicKey, targets []*targetAddr api = newExplorerAPI(apiURL) ) - for _, pubKey := range pubKeys { + for idx, pubKey := range pubKeys { + log.Infof("Trying to find targets for pubkey %x (%d of %d)", + pubKey.SerializeCompressed(), idx+1, len(pubKeys)) + for index := range recoveryWindow { desc := &keychain.KeyDescriptor{ PubKey: pubKey, @@ -370,6 +373,14 @@ func findTargetsCln(hsmSecret [32]byte, pubKeys []*btcec.PublicKey, "for addresses with funds: %w", err) } targets = append(targets, foundTargets...) + + if idx > 0 && idx%200 == 0 { + log.Infof("Tried %d addresses for pubkey "+ + "%x (%d of %d), found %d targets so "+ + "far", index+1, + pubKey.SerializeCompressed(), idx+1, + len(pubKeys), len(targets)) + } } }