I push a transaction to a node and receive a transaction id in return. How do I know that transaction is irreversibly confirmed?
From the wiki: https://github.com/EOSIO/eos/wiki/Smart-Contract#transaction-confirmation
On completion of the transaction, a transaction receipt is generated. Receiving a transaction hash does not mean that the transaction has been confirmed, it only means that the node accepted it without error, which also means that there is a high probability other producers will accept it.
By means of confirmation, you should see the transaction in the transaction history with the block number of which it is included.
You can pull a transaction by its id, and check if it has a block_num
Where a transaction looks like
{
"expiration": "2018-04-01T15:20:44",
"region": 0,
"ref_block_num": 42580,
"ref_block_prefix": 3987474256,
...
}
Note: I haven't actually tried this myself
-
This seems to indicate that the transaction has been included in a block, which does not necessarily indicate finality AFAIK. How is finality assured? – kkurian May 14 '18 at 22:44
-
Do you mean "irreversibility"? See eosio.stackexchange.com/questions/395/… – Aaron Voelker May 23 '18 at 3:48
-
last_irreversible_block
). – Aaron Voelker May 25 '18 at 3:20