Skip to content

Commit fb91290

Browse files
committed
sweep: remove redundant loopvar assign
1 parent dff695b commit fb91290

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

sweep/fee_bumper.go

+3-9
Original file line numberDiff line numberDiff line change
@@ -911,34 +911,28 @@ func (t *TxPublisher) processRecords() {
911911
// For records that are confirmed, we'll notify the caller about this
912912
// result.
913913
for requestID, r := range confirmedRecords {
914-
rec := r
915-
916914
log.Debugf("Tx=%v is confirmed", r.tx.TxHash())
917915
t.wg.Add(1)
918-
go t.handleTxConfirmed(rec, requestID)
916+
go t.handleTxConfirmed(r, requestID)
919917
}
920918

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

924922
// For records that are not confirmed, we perform a fee bump if needed.
925923
for requestID, r := range feeBumpRecords {
926-
rec := r
927-
928924
log.Debugf("Attempting to fee bump Tx=%v", r.tx.TxHash())
929925
t.wg.Add(1)
930-
go t.handleFeeBumpTx(requestID, rec, currentHeight)
926+
go t.handleFeeBumpTx(requestID, r, currentHeight)
931927
}
932928

933929
// For records that are failed, we'll notify the caller about this
934930
// result.
935931
for requestID, r := range failedRecords {
936-
rec := r
937-
938932
log.Debugf("Tx=%v has inputs been spent by a third party, "+
939933
"failing it now", r.tx.TxHash())
940934
t.wg.Add(1)
941-
go t.handleThirdPartySpent(rec, requestID)
935+
go t.handleThirdPartySpent(r, requestID)
942936
}
943937
}
944938

0 commit comments

Comments
 (0)