The implementation for this API is that basically Algorand will block the http request until it gets that specified round, or a timeout (1 minute) happens. The key part of the source code is like this:
1 2 3 4 5 6 7 8 9
select { case <-v2.Shutdown: return internalError(ctx, err, errServiceShuttingDown, v2.Log) case <-time.After(1 * time.Minute): case <-ledger.Wait(basics.Round(round + 1)): }
// Return status after the wait return v2.GetStatus(ctx)
*pt, _, err = client.PendingTransactionInformation(txID).Do(context.Background()) if err != nil { fmt.Printf("error getting pending transaction: %s\n", err) var msg = errors.New(strings.Join([]string{"error getting pending transaction: "}, err.Error())) return *pt, msg } if pt.ConfirmedRound > 0 { fmt.Printf("Transaction "+txID+" confirmed in round %d\n", pt.ConfirmedRound) return *pt, nil } if pt.PoolError != "" { fmt.Printf("There was a pool error, then the transaction has been rejected!") var msg = errors.New("There was a pool error, then the transaction has been rejected") return *pt, msg } fmt.Printf("waiting for confirmation\n") status, err = client.StatusAfterBlock(currentRound).Do(context.Background()) currentRound++ } msg := errors.New("Tx not found in round range") return *pt, msg }
The above code are taken from the “how-to” section in this page.