Skip to content

Commit

Permalink
vspd: Stop scanning when ticket spender found.
Browse files Browse the repository at this point in the history
Once the spender of a given ticket is found, the rest of the blocks
don't need to be checked.
  • Loading branch information
jholdstock committed Sep 5, 2023
1 parent fd31972 commit a57a5e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/vspd/spentticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ func (v *vspd) findSpentTickets(toCheck database.TicketList, startHeight int64)
// Current index has been removed which means everything else
// moved up one and thus the same index needs to be repeated.
i--

// Check next ticket.
break
}
}

Expand Down

0 comments on commit a57a5e8

Please sign in to comment.