sweepremoteclose: add more info logging

This commit is contained in:
Oliver Gugger 2025-06-13 20:32:44 +02:00
parent f4e8393362
commit 2af18490d2
No known key found for this signature in database
GPG key ID: 8E4256593F177720

View file

@ -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))
}
}
}