diff --git a/sweepbatcher/sweep_batch.go b/sweepbatcher/sweep_batch.go index da27e30..b0d8c04 100644 --- a/sweepbatcher/sweep_batch.go +++ b/sweepbatcher/sweep_batch.go @@ -35,10 +35,6 @@ const ( // fee rate is increased when an rbf is attempted. defaultFeeRateStep = chainfee.SatPerKWeight(100) - // defaultBatchConfTarget is the default confirmation target of the - // batch transaction. - defaultBatchConfTarget = 12 - // batchConfHeight is the default confirmation height of the batch // transaction. batchConfHeight = 3 @@ -1059,6 +1055,10 @@ func (b *batch) updateRbfRate(ctx context.Context) error { // If the feeRate is unset then we never published before, so we // retrieve the fee estimate from our wallet. if b.rbfCache.FeeRate == 0 { + if b.cfg.batchConfTarget == 0 { + b.log.Warnf("updateRbfRate called with zero " + + "batchConfTarget") + } b.log.Infof("initializing rbf fee rate for conf target=%v", b.cfg.batchConfTarget) rate, err := b.wallet.EstimateFeeRate( diff --git a/sweepbatcher/sweep_batcher.go b/sweepbatcher/sweep_batcher.go index 4c3a533..749da45 100644 --- a/sweepbatcher/sweep_batcher.go +++ b/sweepbatcher/sweep_batcher.go @@ -378,7 +378,6 @@ func (b *Batcher) handleSweep(ctx context.Context, sweep *sweep, func (b *Batcher) spinUpBatch(ctx context.Context) (*batch, error) { cfg := batchConfig{ maxTimeoutDistance: defaultMaxTimeoutDistance, - batchConfTarget: defaultBatchConfTarget, } switch b.chainParams { @@ -488,7 +487,6 @@ func (b *Batcher) spinUpBatchFromDB(ctx context.Context, batch *batch) error { cfg := batchConfig{ maxTimeoutDistance: batch.cfg.maxTimeoutDistance, - batchConfTarget: defaultBatchConfTarget, } newBatch, err := NewBatchFromDB(cfg, batchKit)