sweep: improve loggings

This commit is contained in:
yyforyongyu
2025-03-12 22:21:12 +08:00
parent 533aeb8a25
commit 9a25d7172e
2 changed files with 6 additions and 3 deletions

View File

@@ -1371,7 +1371,7 @@ func (t *TxPublisher) createAndPublishTx(
return fn.Some(*result)
}
log.Infof("Replaced tx=%v with new tx=%v", oldTx.TxHash(),
log.Debugf("Replaced tx=%v with new tx=%v", oldTx.TxHash(),
sweepCtx.tx.TxHash())
// Otherwise, it's a successful RBF, set the event and return.

View File

@@ -824,6 +824,9 @@ func (s *UtxoSweeper) sweep(set InputSet) error {
return fmt.Errorf("gen sweep script: %w", err)
}
s.currentOutputScript = fn.Some(addr)
log.Debugf("Created sweep DeliveryAddress %x",
addr.DeliveryAddress)
}
sweepAddr, err := s.currentOutputScript.UnwrapOrErr(
@@ -1725,8 +1728,8 @@ func (s *UtxoSweeper) handleBumpEventTxReplaced(resp *bumpResp) error {
s.cfg.Wallet.CancelRebroadcast(oldTxid)
log.Infof("RBFed tx=%v(fee=%v sats, feerate=%v sats/kw) with new "+
"tx=%v(fee=%v, "+"feerate=%v)", record.Txid, record.Fee,
record.FeeRate, tr.Txid, tr.Fee, tr.FeeRate)
"tx=%v(fee=%v sats, feerate=%v sats/kw)", record.Txid,
record.Fee, record.FeeRate, tr.Txid, tr.Fee, tr.FeeRate)
// The old sweeping tx has been replaced by a new one, we will update
// the tx record in the sweeper db.