Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix(eth/core): fix typos #1452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions eth/core/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func (bc *blockchain) CurrentSnapBlock() *ethtypes.Header {
return nil
}

// GetHeadersFrom returns a contiguous segment of headers, in rlp-form, going
// backwards from the given number.
// CurrentFinalBlock retrieves the current finalized block of the canonical
// chain. The block is retrieved from the blockchain's internal cache.
func (bc *blockchain) CurrentFinalBlock() *ethtypes.Header {
fb, ok := utils.GetAs[*ethtypes.Block](bc.finalizedBlock.Load())
if fb == nil || !ok {
Expand Down Expand Up @@ -138,7 +138,7 @@ func (bc *blockchain) GetBlockByHash(hash common.Hash) *ethtypes.Block {
return block
}

// GetBlock retrieves a block from the database by hash and number, caching it if found.
// GetBlockByNumber retrieves a block from the database by number, caching it if found.
func (bc *blockchain) GetBlockByNumber(number uint64) *ethtypes.Block {
// check the block number cache
if block, ok := bc.blockNumCache.Get(number); ok {
Expand Down Expand Up @@ -175,7 +175,7 @@ func (bc *blockchain) GetBlockByNumber(number uint64) *ethtypes.Block {
return block
}

// GetReceipts gathers the receipts that were created in the block defined by
// GetReceiptsByHash gathers the receipts that were created in the block defined by
// the given hash.
func (bc *blockchain) GetReceiptsByHash(blockHash common.Hash) ethtypes.Receipts {
// check the cache
Expand Down Expand Up @@ -213,7 +213,7 @@ func (bc *blockchain) GetReceiptsByHash(blockHash common.Hash) ethtypes.Receipts
return derived
}

// GetTransaction gets a transaction by hash. It also returns the block hash of the
// GetTransactionLookup gets a transaction by hash. It also returns the block hash of the
// block that the transaction was included in, the block number, and the index of the
// transaction in the block. It only retrieves transactions that are included in the chain
// and does not acquire transactions that are in the mempool.
Expand Down
2 changes: 1 addition & 1 deletion eth/core/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (bc *blockchain) writeBlockWithState(
return nil
}

// InsertBlock inserts a block into the canonical chain and updates the state of the blockchain.
// writeHistoricalData inserts a block into the canonical chain and updates the state of the blockchain.
// TODO: WRITE TO EXTERNAL STORE
func (bc *blockchain) writeHistoricalData(
block *ethtypes.Block,
Expand Down
Loading