Skip to content

Commit

Permalink
change validation to be preemvtive
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Nov 22, 2022
1 parent 69f3bc5 commit 73453ea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions types/mempool/sender_nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,12 @@ func (i *senderNonceMepoolIterator) Next() Iterator {
continue
}

if senderCursor == nil {
if nextCursor := senderCursor.Next(); nextCursor != nil {
i.senderCursors[sender] = nextCursor
} else {
i.senders = removeAtIndex(i.senders, senderIndex)
continue
}

i.senderCursors[sender] = senderCursor.Next()

return &senderNonceMepoolIterator{
senders: i.senders,
currentTx: senderCursor,
Expand Down

0 comments on commit 73453ea

Please sign in to comment.