0

Say I make some transaction with web3 which is picked up and validated by two miners A and B. A produced what turned out to be an uncle block and B contributed to the main-chain. If web3 gave me the receipt for my transaction mined by A, is there some way to get the receipt for the transaction in the block that miner B added to the main-chain?

1

Call getTransactionReceipt again with the transaction hash. The Ethereum client/Infura should return a valid receipt that belong to the main chain.

| improve this answer | |
  • So the transaction hash is same regardless the block it is included in and can therefore be retrieved in any case so long it is included in some block on the main chain or otherwise? – Conviley Apr 30 at 7:24
  • Yes, you are correct. The transaction hash is calculated from the signed transaction, only depends on transaction data and transaction signature. – Ismael Apr 30 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.