Skip to content

Commit

Permalink
skip adding accounts if pending acts is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Liuhaai committed Dec 20, 2023
1 parent e5e3046 commit b5b98c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actpool/queueworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,13 @@ func (worker *queueWorker) PendingActions(ctx context.Context) []*pendingActions
// Remove the actions that are already timeout
acts := queue.UpdateQueue()
worker.ap.removeInvalidActs(acts)
pd := queue.PendingActs(ctx)
if len(pd) == 0 {
continue
}
actionArr = append(actionArr, &pendingActions{
sender: from,
acts: queue.PendingActs(ctx),
acts: pd,
})
}
return actionArr
Expand Down

0 comments on commit b5b98c1

Please sign in to comment.