vspd: Stop scanning when ticket spender found.

Once the spender of a given ticket is found, the rest of the blocks
don't need to be checked.
This commit is contained in:
jholdstock 2023-09-05 09:59:14 +01:00 committed by Jamie Holdstock
parent 2af3d4eca7
commit 939f094104

View File

@ -172,6 +172,9 @@ func (v *vspd) findSpentTickets(toCheck database.TicketList, startHeight int64)
// Current index has been removed which means everything else // Current index has been removed which means everything else
// moved up one and thus the same index needs to be repeated. // moved up one and thus the same index needs to be repeated.
i-- i--
// Check next ticket.
break
} }
} }