The current Ae.WaitForTransactionUntilHeight() does the following:
Get current generation
Get each microblock (each one is a HTTP request)
Look for the txhash.
This is inefficient and the code is rather convoluted (2 for loops with minor variable scoping issues)
I think the /transactions/(txhash) is already available even if the transaction is not yet in a microblock. If that is the case, it is a simple matter to:
Poll /transactions/txhash until a microblock hash is mentioned and /blocks/top to get current height
Fetch info about the microblock.
EDIT: surprisingly complicated. Needs proper Big Integer support.
The current Ae.WaitForTransactionUntilHeight() does the following:
This is inefficient and the code is rather convoluted (2 for loops with minor variable scoping issues) I think the /transactions/(txhash) is already available even if the transaction is not yet in a microblock. If that is the case, it is a simple matter to:
EDIT: surprisingly complicated. Needs proper Big Integer support.