Use geth's eth API instead of ethclient on missing blocks for getHeaderByHash
To maintain compatibility with geth's eth API, GetHeaderByHash() is required to include totalDifficulty in the result
ethclient's HeaderByHashmethod returns just the header object which doesn't have the totalDifficulty
Since geth's getHeaderByHash API implementation includes totalDifficulty in the result, it is not required to be fetched separately
Part of https://github.com/vulcanize/ipld-eth-server/issues/180
- Use geth's eth API instead of ethclient on missing blocks for `getHeaderByHash`
- To maintain compatibility with geth's eth API, `GetHeaderByHash()` is required to include `totalDifficulty` in the result
- ethclient's `HeaderByHash` [method](https://github.com/ethereum/go-ethereum/blob/v1.10.20/ethclient/ethclient.go#L176) returns just the header object which doesn't have the `totalDifficulty`
- Since geth's `getHeaderByHash` API [implementation](https://github.com/ethereum/go-ethereum/blob/v1.10.20/internal/ethapi/api.go#L708) includes `totalDifficulty` in the result, it is not required to be fetched separately
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of https://github.com/vulcanize/ipld-eth-server/issues/180
getHeaderByHashGetHeaderByHash()is required to includetotalDifficultyin the resultHeaderByHashmethod returns just the header object which doesn't have thetotalDifficultygetHeaderByHashAPI implementation includestotalDifficultyin the result, it is not required to be fetched separately