dtube / avalon

Blockchain for social distribution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a new call for transacting that returns only when the transaction is included in a block

skzap opened this issue · comments

Presently, the /transact call of the avalon api, instantly returns after adding the transaction to the pool (if it seems valid on the current timestamp). Then, javalon does some monkey business (checking /block/X+1 repetedly on the API) to see if a transaction went through or not and being able to confirm that the transaction was a success to the UI.

In practise this works, but we could have another call /transactAndWait that waits for the transaction to been included in a block before returning. This would reduce the perceived time it takes to do any type of transaction through a UI by some good amount.

This was done like 3 months ago. Closing ;)