We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6909b30 commit d28180eCopy full SHA for d28180e
1 file changed
block/internal/reaping/reaper.go
@@ -155,10 +155,9 @@ type pendingTx struct {
155
156
func (r *Reaper) drainMempool() (bool, error) {
157
var totalSubmitted int
158
- submitted := false
159
160
defer func() {
161
- if submitted && r.onTxsSubmitted != nil {
+ if totalSubmitted > 0 && r.onTxsSubmitted != nil {
162
r.onTxsSubmitted()
163
}
164
}()
@@ -182,7 +181,6 @@ func (r *Reaper) drainMempool() (bool, error) {
182
181
return totalSubmitted > 0, err
183
184
totalSubmitted += n
185
- submitted = true
186
187
188
if totalSubmitted > 0 {
0 commit comments