In the app I'm writing, you create payments, sign them with the wallet, and then call goTezos.PostResponse to /injection/operation This usually returns immediately, indicating that your op was accepted by the node to which you are connected. But the return does not mean it has been processed by the network. You have to wait, at minimum, for the current block to complete, or in the future when there are many more transactions per block, you may need to wait several blocks.
The tezos-client provides wait for <op> to be included, which does the following:
grab the previous 10 blocks, look for op hash
if not found, look at head
sleep some amount of time, fetch head, repeat until found
if you specify --confirmations N, sleep-head-repeat until N confirmations
35 supports fetching block operation hashs. After/When/If merged, what is the best way to "poll" looking for ops using goTezos?
In the app I'm writing, you create payments, sign them with the wallet, and then call goTezos.PostResponse to
/injection/operation
This usually returns immediately, indicating that your op was accepted by the node to which you are connected. But the return does not mean it has been processed by the network. You have to wait, at minimum, for the current block to complete, or in the future when there are many more transactions per block, you may need to wait several blocks.The
tezos-client
provideswait for <op> to be included
, which does the following:--confirmations N
, sleep-head-repeat until N confirmations35 supports fetching block operation hashs. After/When/If merged, what is the best way to "poll" looking for ops using goTezos?
Here is a function that I was considering adding to goTezosBlock.go: https://gist.github.com/utdrmac/74e00b6c722dcbd3dffd9e7961a00b33
Thoughts on this? Should this be added to goTezos or should this type of implementation be left up to the caller and just utilize #35?