From e9916cb555f9f8c584a2d6ae7b6caeed38d400e0 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Fri, 9 Feb 2024 14:42:40 +0530 Subject: [PATCH] fix : TestRPCGetTransactionReceiptsByBlock --- internal/ethapi/api.go | 7 +------ internal/ethapi/api_test.go | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 23a31efd17..c632cf9971 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -703,12 +703,7 @@ func (s *BlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context, block for idx, receipt := range receipts { tx := txs[idx] - var signer types.Signer = types.FrontierSigner{} - - if tx.Protected() { - signer = types.NewEIP155Signer(tx.ChainId()) - } - + signer := types.MakeSigner(s.b.ChainConfig(), block.Number(), block.Time()) from, _ := types.Sender(signer, tx) fields := map[string]interface{}{ diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 5c28022b42..6d85c4b6f1 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -1737,7 +1737,6 @@ func TestRPCGetTransactionReceiptsByBlock(t *testing.T) { "blockNumber": "0x1", "contractAddress": null, "cumulativeGasUsed": "0x5208", - "effectiveGasPrice": "0x342770c0", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", "gasUsed": "0x5208", "logs": [ @@ -1774,7 +1773,6 @@ func TestRPCGetTransactionReceiptsByBlock(t *testing.T) { "blockNumber": "0x1", "contractAddress": "0xae9bea628c4ce503dcfd7e305cab4e29e7476592", "cumulativeGasUsed": "0x12156", - "effectiveGasPrice": "0x342770c0", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", "gasUsed": "0xcf4e", "logs": [], @@ -1794,7 +1792,6 @@ func TestRPCGetTransactionReceiptsByBlock(t *testing.T) { "blockNumber": "0x1", "contractAddress": null, "cumulativeGasUsed": "0x17f7e", - "effectiveGasPrice": "0x342770c0", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", "gasUsed": "0x5e28", "logs": [ @@ -1830,7 +1827,6 @@ func TestRPCGetTransactionReceiptsByBlock(t *testing.T) { "blockNumber": "0x1", "contractAddress": null, "cumulativeGasUsed": "0x1d30b", - "effectiveGasPrice": "0x342772b4", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", "gasUsed": "0x538d", "logs": [ @@ -1867,7 +1863,6 @@ func TestRPCGetTransactionReceiptsByBlock(t *testing.T) { "blockNumber": "0x1", "contractAddress": "0xfdaa97661a584d977b4d3abb5370766ff5b86a18", "cumulativeGasUsed": "0x2b325", - "effectiveGasPrice": "0x342770c0", "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", "gasUsed": "0xe01a", "logs": [],