diff --git a/cmd/chantools/sweeptimelock.go b/cmd/chantools/sweeptimelock.go index c01e6af..84e2008 100644 --- a/cmd/chantools/sweeptimelock.go +++ b/cmd/chantools/sweeptimelock.go @@ -373,6 +373,12 @@ func bruteForceDelay(delayPubkey, revocationPubkey *btcec.PublicKey, return 0, nil, nil, fmt.Errorf("error hashing script: "+ "%w", err) } + + _, targetAddr, _, _ := txscript.ExtractPkScriptAddrs(targetScript, chainParams) + _, addr, _, _ := txscript.ExtractPkScriptAddrs(sh, chainParams) + + log.Infof("Target address: %v, Computed Address :%v, at "+ + "csv_delay=%v", targetAddr, addr, i) if bytes.Equal(targetScript[0:8], sh[0:8]) { return int32(i), s, sh, nil } diff --git a/cmd/chantools/sweeptimelockmanual.go b/cmd/chantools/sweeptimelockmanual.go index 9f1749c..f97d475 100644 --- a/cmd/chantools/sweeptimelockmanual.go +++ b/cmd/chantools/sweeptimelockmanual.go @@ -322,6 +322,8 @@ func sweepTimeLockManual(extendedKey *hdkeychain.ExtendedKey, apiURL string, commitPoint *btcec.PublicKey ) for i := startNumChannels; i < maxNumChannels; i++ { + log.Infof("Trying RevocationRoot at %v", i) + csvTimeout, script, scriptHash, commitPoint, delayDesc, err = tryKey( baseKey, remoteRevPoint, startCsvTimeout, maxCsvTimeout, lockScript, uint32(i), startNumChanUpdates, @@ -335,7 +337,8 @@ func sweepTimeLockManual(extendedKey *hdkeychain.ExtendedKey, apiURL string, break } - log.Infof("Tried %d of %d keys.", i+1, maxKeys) + log.Infof("Tried key %d of %d keys.", startNumChannels, + maxNumChannels) } // Did we find what we looked for or did we just exhaust all @@ -598,6 +601,8 @@ func bruteForceDelayPoint(delayBase, revBase *btcec.PublicKey, maxChanUpdates uint64) (int32, []byte, []byte, *btcec.PublicKey, error) { + log.Infof("=========Different ShaRootCreation===========") + for i := startNumChanUpdates; i < maxChanUpdates; i++ { revPreimage, err := revRoot.AtIndex(i) if err != nil { @@ -605,6 +610,8 @@ func bruteForceDelayPoint(delayBase, revBase *btcec.PublicKey, } commitPoint := input.ComputeCommitmentPoint(revPreimage[:]) + log.Infof("CommitPoint at ChanUpdate#%v", i) + csvTimeout, script, scriptHash, err := bruteForceDelay( input.TweakPubKey(delayBase, commitPoint), input.DeriveRevocationPubkey(revBase, commitPoint),