Merge pull request #10389 from filecoin-project/asr/fix-eth-api-genesis

fix: EthAPI: Correctly get parent hash
This commit is contained in:
Aayush Rajasekaran
2023-03-06 09:15:48 -05:00
committed by GitHub
2 changed files with 23 additions and 5 deletions
+1 -5
View File
@@ -1763,11 +1763,7 @@ func (e *ethSubscription) stop() {
}
func newEthBlockFromFilecoinTipSet(ctx context.Context, ts *types.TipSet, fullTxInfo bool, cs *store.ChainStore, sa StateAPI) (ethtypes.EthBlock, error) {
parent, err := cs.LoadTipSet(ctx, ts.Parents())
if err != nil {
return ethtypes.EthBlock{}, err
}
parentKeyCid, err := parent.Key().Cid()
parentKeyCid, err := ts.Parents().Cid()
if err != nil {
return ethtypes.EthBlock{}, err
}