From ca523a7da4df4b4f245592eb89497d3f1861a059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20IRMAK?= Date: Thu, 19 Jun 2025 18:24:05 +0300 Subject: [PATCH] core/rawdb: rename ReadRawReceipt --- core/blockchain_reader.go | 2 +- core/blockchain_test.go | 4 ++-- core/rawdb/accessors_indexes.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/blockchain_reader.go b/core/blockchain_reader.go index cec606b920..3ec0c85d1e 100644 --- a/core/blockchain_reader.go +++ b/core/blockchain_reader.go @@ -233,7 +233,7 @@ func (bc *BlockChain) GetReceiptByIndex(tx *types.Transaction, blockHash common. if header.ExcessBlobGas != nil { blobGasPrice = eip4844.CalcBlobFee(bc.chainConfig, header) } - receipt, ctx, err := rawdb.ReadRawReceipt(bc.db, blockHash, blockNumber, txIndex) + receipt, ctx, err := rawdb.ReadRawReceiptWithContext(bc.db, blockHash, blockNumber, txIndex) if err != nil { return nil, err } diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 353293d138..b85f0a9d00 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1021,7 +1021,7 @@ func testChainTxReorgs(t *testing.T, scheme string) { } if rcpt, _, _, index := rawdb.ReadReceipt(db, tx.Hash(), blockchain.Config()); rcpt == nil { t.Errorf("add %d: expected receipt to be found", i) - } else if rawRcpt, ctx, _ := rawdb.ReadRawReceipt(db, rcpt.BlockHash, rcpt.BlockNumber.Uint64(), index); rawRcpt == nil { + } else if rawRcpt, ctx, _ := rawdb.ReadRawReceiptWithContext(db, rcpt.BlockHash, rcpt.BlockNumber.Uint64(), index); rawRcpt == nil { t.Errorf("add %d: expected raw receipt to be found", i) } else { if rcpt.GasUsed != ctx.GasUsed { @@ -1039,7 +1039,7 @@ func testChainTxReorgs(t *testing.T, scheme string) { } if rcpt, _, _, index := rawdb.ReadReceipt(db, tx.Hash(), blockchain.Config()); rcpt == nil { t.Errorf("share %d: expected receipt to be found", i) - } else if rawRcpt, ctx, _ := rawdb.ReadRawReceipt(db, rcpt.BlockHash, rcpt.BlockNumber.Uint64(), index); rawRcpt == nil { + } else if rawRcpt, ctx, _ := rawdb.ReadRawReceiptWithContext(db, rcpt.BlockHash, rcpt.BlockNumber.Uint64(), index); rawRcpt == nil { t.Errorf("add %d: expected raw receipt to be found", i) } else { if rcpt.GasUsed != ctx.GasUsed { diff --git a/core/rawdb/accessors_indexes.go b/core/rawdb/accessors_indexes.go index 28e73b6c89..06ece36350 100644 --- a/core/rawdb/accessors_indexes.go +++ b/core/rawdb/accessors_indexes.go @@ -289,10 +289,10 @@ type RawReceiptContext struct { LogIndex uint // Starting index of the logs within the block } -// ReadRawReceipt reads a raw receipt at the specified position. It also returns +// ReadRawReceiptWithContext reads a raw receipt at the specified position. It also returns // the gas used by the associated transaction and the starting index of the logs // within the block. -func ReadRawReceipt(db ethdb.Reader, blockHash common.Hash, blockNumber, txIndex uint64) (*types.Receipt, RawReceiptContext, error) { +func ReadRawReceiptWithContext(db ethdb.Reader, blockHash common.Hash, blockNumber, txIndex uint64) (*types.Receipt, RawReceiptContext, error) { receiptIt, err := rlp.NewListIterator(ReadReceiptsRLP(db, blockHash, blockNumber)) if err != nil { return nil, RawReceiptContext{}, err