Fix for getTransactionReceipt returning empty 'from' address.

This commit is contained in:
Thomas E Lackey 2023-06-09 18:44:30 -05:00
parent 50b402cfaa
commit 1bf1c064ef

View File

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