future.WaitForConfirmation sometimes returns timeout

I use future.WaitForConfirmation(c *algod.Client, txid string, waitRounds uint64, ctx context.Context) to check whether a transaction is completed but sometimes it returns timeout Wait for transaction id GCPI22H7OQ27537Y2ZQINWFEHL2RFLWXIHEMKIGGLE3OGFVYESUA timed out.
Is this because the transaction was completed too long ago?

You can check on a block explorer or on the indexer whether the transaction was committed or not.

Another reason may be that waitRounds is too low?

1 Like