-1

I am trying to wait for the receipt as long as my transaction is valid.

At the moment, I use the TransactionReceiptQuery method in a loop, and after each 'failing' query I wait 2 seconds before retrying.

Is there a better way to wait for the receipt as long as the transaction is valid (without using a loop)? And do I need a timeout? Is there a request limit on how often I can execute that query?

At the moment, I'm using a loop to query for the result. If the query fails, I wait two seconds before trying again.

1 Answers1

0

The SDK already queries in a loop, it increases the delay between each query (2s, 4s, 8s...) until it times out (~ 2 minutes).

In the event of a timeout, you'll get a TRANSACTION_EXPIRED error.

Greg Scullard
  • 241
  • 1
  • 10