From 9a25d7172e7e4ad3be42fa4d1ae4b9e2c19a2a89 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 12 Mar 2025 22:21:12 +0800 Subject: [PATCH] sweep: improve loggings --- sweep/fee_bumper.go | 2 +- sweep/sweeper.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sweep/fee_bumper.go b/sweep/fee_bumper.go index 6a796e22d..b081fe479 100644 --- a/sweep/fee_bumper.go +++ b/sweep/fee_bumper.go @@ -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. diff --git a/sweep/sweeper.go b/sweep/sweeper.go index 9684039e4..69cf9c5d8 100644 --- a/sweep/sweeper.go +++ b/sweep/sweeper.go @@ -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.