main() uses context.Background() with no timeout, and waitForConfirmation blocks on time.Sleep without ever checking ctx.Done(). A hung indexer call never times out and Ctrl-C does not interrupt a -wait. Use signal.NotifyContext for interrupts, give the run an overall timeout, and select on ctx.Done() in the poll loop instead of a bare sleep.
main() uses context.Background() with no timeout, and waitForConfirmation blocks on time.Sleep without ever checking ctx.Done(). A hung indexer call never times out and Ctrl-C does not interrupt a -wait. Use signal.NotifyContext for interrupts, give the run an overall timeout, and select on ctx.Done() in the poll loop instead of a bare sleep.