Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Code0x2 committed Oct 28, 2024
1 parent b53a905 commit 201a0cd
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1570,24 +1570,6 @@ func RPCMarshalCompactLogs(logs [][]*types.Log) []map[string]interface{} {
return logMap
}

// rpcMarshalHeader uses the generalized output filler, then adds the total difficulty field, which requires
// a `BlockchainAPI`.
func (api *BlockChainAPI) rpcMarshalHeader(ctx context.Context, header *types.Header) map[string]interface{} {
fields := RPCMarshalHeader(header)
fields["totalDifficulty"] = (*hexutil.Big)(api.b.GetTd(ctx, header.Hash()))
return fields
}

// rpcMarshalBlock uses the generalized output filler, then adds the total difficulty field, which requires
// a `BlockchainAPI`.
func (api *BlockChainAPI) rpcMarshalBlock(ctx context.Context, b *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) {
fields := RPCMarshalBlock(b, inclTx, fullTx, api.b.ChainConfig())
if inclTx {
fields["totalDifficulty"] = (*hexutil.Big)(api.b.GetTd(ctx, b.Hash()))
}
return fields, nil
}

// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
type RPCTransaction struct {
BlockHash *common.Hash `json:"blockHash"`
Expand Down

0 comments on commit 201a0cd

Please sign in to comment.