You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User successfully initiated two parallel transactions of same token amount , 1st transaction got mined successfully and tokens sent to other user, the 2nd one is also mined and marked status as "success", but actually it is a double spending transaction so its not marked as "failed" by blockchain.
When I fetch transaction details and transaction receipt for both above transactions from blockchain, I'm getting status "success" for both, which is a bit weird and web3 tx details and tx receipt functions doesn't return any specific status for 2nd tx (which is actually failed but with status success) .The only difference between two transactions details is the "log" details, is it good to mark a transaction failed if its TransactionReceipt log field is empty?
Expected behavior
Web3 functions TransactionDetails or TransactionReceipt should return some specific status for transactions which are with status "success" but actually failed (please refer to tx no. 2)
Actual behavior
Web3 functions TransactionDetails or TransactionReceipt returning status "success" for both transactions, but actually 2nd tx is failed (please refer to tx no. 2)
Steps to reproduce the behavior
Example:
1. Import `web3`
2. Set the provider to `mainnet`
3. Fetch transaction details and transaction receipt for both above transactions.
4. You will get status "success" for both transactions, but actually 2nd tx is failed.
Please use the code blocks Markdown does provide:
var transaction = await this.web3.eth.getTransaction(tx_id);
console.log(transaction);
var getTransactionReceipt = await this.web3.eth.getTransactionReceipt(tx_id);
console.log(getTransactionReceipt);
Versions
web3.js: ^1.0.0-beta.55
nodejs: v10.15.3
ethereum node: Infura Mainnet
Thanks,
Surinder kumar
The text was updated successfully, but these errors were encountered:
Your contract does return false and doesn't have a require who is reverting the transaction this is the reason why the transaction has the status true.
Hi,
confirmed-tx-details.txt
confirmed-but-failed-txt-details.txt
Description
I'm not able to distinguish between two transactions, both are successful but 2nd one is actually failed by ethereum later.
Tx status is "success" and tokens transferred:
https://etherscan.io/tx/0xdb93c83d526ee74f011bba06e5358989510802f283c073f7329e221db7e47126
Tx status is "success" and but tokens not transferred (its a double spending tx):
https://etherscan.io/tx/0xd6b4496575531167c8d434c51aac39cfa24bfbfaae98295ff44481b63175700f
User successfully initiated two parallel transactions of same token amount , 1st transaction got mined successfully and tokens sent to other user, the 2nd one is also mined and marked status as "success", but actually it is a double spending transaction so its not marked as "failed" by blockchain.
When I fetch transaction details and transaction receipt for both above transactions from blockchain, I'm getting status "success" for both, which is a bit weird and web3 tx details and tx receipt functions doesn't return any specific status for 2nd tx (which is actually failed but with status success) .The only difference between two transactions details is the "log" details, is it good to mark a transaction failed if its TransactionReceipt log field is empty?
Expected behavior
Web3 functions TransactionDetails or TransactionReceipt should return some specific status for transactions which are with status "success" but actually failed (please refer to tx no. 2)
Actual behavior
Web3 functions TransactionDetails or TransactionReceipt returning status "success" for both transactions, but actually 2nd tx is failed (please refer to tx no. 2)
Steps to reproduce the behavior
Versions
Thanks,
Surinder kumar
The text was updated successfully, but these errors were encountered: