Skip to content

Commit

Permalink
sweep: remove redundant loopvar assign
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Oct 25, 2024
1 parent 2ae8330 commit 0f280d2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions sweep/fee_bumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,34 +897,28 @@ func (t *TxPublisher) processRecords() {
// For records that are confirmed, we'll notify the caller about this
// result.
for requestID, r := range confirmedRecords {
rec := r

log.Debugf("Tx=%v is confirmed", r.tx.TxHash())
t.wg.Add(1)
go t.handleTxConfirmed(rec, requestID)
go t.handleTxConfirmed(r, requestID)
}

// Get the current height to be used in the following goroutines.
currentHeight := t.currentHeight.Load()

// For records that are not confirmed, we perform a fee bump if needed.
for requestID, r := range feeBumpRecords {
rec := r

log.Debugf("Attempting to fee bump Tx=%v", r.tx.TxHash())
t.wg.Add(1)
go t.handleFeeBumpTx(requestID, rec, currentHeight)
go t.handleFeeBumpTx(requestID, r, currentHeight)
}

// For records that are failed, we'll notify the caller about this
// result.
for requestID, r := range failedRecords {
rec := r

log.Debugf("Tx=%v has inputs been spent by a third party, "+
"failing it now", r.tx.TxHash())
t.wg.Add(1)
go t.handleThirdPartySpent(rec, requestID)
go t.handleThirdPartySpent(r, requestID)
}
}

Expand Down

0 comments on commit 0f280d2

Please sign in to comment.