Skip to content

Commit d28180e

Browse files
committed
remove redundant
1 parent 6909b30 commit d28180e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

block/internal/reaping/reaper.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ type pendingTx struct {
155155

156156
func (r *Reaper) drainMempool() (bool, error) {
157157
var totalSubmitted int
158-
submitted := false
159158

160159
defer func() {
161-
if submitted && r.onTxsSubmitted != nil {
160+
if totalSubmitted > 0 && r.onTxsSubmitted != nil {
162161
r.onTxsSubmitted()
163162
}
164163
}()
@@ -182,7 +181,6 @@ func (r *Reaper) drainMempool() (bool, error) {
182181
return totalSubmitted > 0, err
183182
}
184183
totalSubmitted += n
185-
submitted = true
186184
}
187185

188186
if totalSubmitted > 0 {

0 commit comments

Comments
 (0)