Fix for getTransactionReceipt returning empty 'from' address. #242

Merged
telackey merged 3 commits from telackey/receiptfix into v5 2023-06-12 16:37:46 +00:00
Showing only changes of commit 1bf1c064ef - Show all commits

View File

@ -604,9 +604,11 @@ func (pea *PublicEthAPI) localGetTransactionReceipt(ctx context.Context, hash co
} }
receipt := receipts[index] receipt := receipts[index]
var signer types.Signer = types.FrontierSigner{} var signer types.Signer
if tx.Protected() { if tx.Protected() {
signer = types.NewEIP155Signer(tx.ChainId()) signer = types.LatestSignerForChainID(tx.ChainId())
} else {
signer = types.HomesteadSigner{}
} }
from, _ := types.Sender(signer, tx) from, _ := types.Sender(signer, tx)