mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopout: log failed sweeps to allow out of band publish
This commit is contained in:
parent
34644bdf0d
commit
a9dbaee102
1 changed files with 16 additions and 2 deletions
18
loopout.go
18
loopout.go
|
|
@ -1,6 +1,7 @@
|
|||
package loop
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
|
|
@ -1557,7 +1558,14 @@ func (s *loopOutSwap) sweepMuSig2(ctx context.Context,
|
|||
labels.LoopOutSweepSuccess(swap.ShortHash(&s.hash)),
|
||||
)
|
||||
if err != nil {
|
||||
s.log.Warnf("Publish of MuSig2 sweep failed: %v", err)
|
||||
var sweepTxBuf bytes.Buffer
|
||||
if err := sweepTx.Serialize(&sweepTxBuf); err != nil {
|
||||
s.log.Warnf("Unable to serialize sweep txn: %v", err)
|
||||
}
|
||||
|
||||
s.log.Warnf("Publish of MuSig2 sweep failed: %v. Raw tx: %x",
|
||||
err, sweepTxBuf.Bytes())
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -1637,7 +1645,13 @@ func (s *loopOutSwap) sweep(ctx context.Context, htlcOutpoint wire.OutPoint,
|
|||
labels.LoopOutSweepSuccess(swap.ShortHash(&s.hash)),
|
||||
)
|
||||
if err != nil {
|
||||
s.log.Warnf("Publish sweep: %v", err)
|
||||
var sweepTxBuf bytes.Buffer
|
||||
if err := sweepTx.Serialize(&sweepTxBuf); err != nil {
|
||||
s.log.Warnf("Unable to serialize sweep txn: %v", err)
|
||||
}
|
||||
|
||||
s.log.Warnf("Publish sweep failed: %v. Raw tx: %x",
|
||||
err, sweepTxBuf.Bytes())
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue