A discussion about how to judge if a transaction is successed


#1

If i want to confirm whether a transaction is successful or not, I always use getTransactionReceipt and see if the filed “status” in response object is “0x1”. If so, I recognize this transaction is successful. But I saw a new case this days. Although the value of “status” is “0x1”, the transaction is failed as a result. This usually occur around contract transaction.
That is all of issue i face now.So i want a specific way to confirm whether a transaction is successful.Do you guys have some excellent ideas?


#2

ETC doesn’t have the status variable supported so you need to check other things (that the transaction didn’t throw or didn’t use all its gas).

Not sure what the ideal method is but @ddr or @splix or @superfreek may be able to help you out.


#3

Classic Geth supports status with latest releases.
@HardyZhang can you provide an example of transaction with invalid status?


#4

Thank you very much for your reply. I got a exception when I use web3j to fetch receipt, because there isn’t field “status” at previous version of etc client.:joy:


#5

No, I have not found any failed occurred in ETC transaction.So does it just happen in contract transaction? And I’ve found the new version which supported “status”