Skip to content

Commit

Permalink
jsonrpc: Remove totalDifficulty hack for hive (#13616)
Browse files Browse the repository at this point in the history
  • Loading branch information
somnathb1 authored Jan 30, 2025
1 parent 1fb2eb5 commit 4b2cd94
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions turbo/jsonrpc/eth_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,6 @@ func (api *APIImpl) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber
}
additionalFields := make(map[string]interface{})

// =============================
// TODO - remove this after https://github.com/ethereum/execution-apis/pull/570 is implemented by Hive and rest of the community
td, err := rawdb.ReadTd(tx, b.Hash(), b.NumberU64())
if err != nil {
return nil, err
}
if td != nil {
additionalFields["totalDifficulty"] = (*hexutil.Big)(td)
}
// =================================
chainConfig, err := api.chainConfig(ctx, tx)
if err != nil {
return nil, err
Expand Down Expand Up @@ -309,17 +299,6 @@ func (api *APIImpl) GetBlockByHash(ctx context.Context, numberOrHash rpc.BlockNu
}
number := block.NumberU64()

// =============================
// TODO - remove this after https://github.com/ethereum/execution-apis/pull/570 is implemented by Hive and rest of the community
td, err := rawdb.ReadTd(tx, hash, number)
if err != nil {
return nil, err
}
if td != nil {
additionalFields["totalDifficulty"] = (*hexutil.Big)(td)
}
// ==============================

chainConfig, err := api.chainConfig(ctx, tx)
if err != nil {
return nil, err
Expand Down

0 comments on commit 4b2cd94

Please sign in to comment.