v3tool: Continue if a ticket already has paid fee.

v3tool will now attempt to register all tickets with the VSP rather
than immediately exiting if one of the tickets already has a paid fee.
This commit is contained in:
jholdstock 2024-07-17 09:53:09 +01:00 committed by Jamie Holdstock
parent 63b2a6117d
commit a80e40d650

View File

@ -144,6 +144,13 @@ func run() int {
if errors.Is(err, context.Canceled) {
return 0
}
// Continue to the next ticket if this one already has a paid fee.
var apiErr types.ErrorResponse
if errors.As(err, &apiErr) && apiErr.Code == types.ErrFeeAlreadyReceived {
continue
}
log.Errorf("getFeeAddress error: %v", err)
return 1
}