fix: EthAPI: Correctly get parent hash

This commit is contained in:
Aayush
2023-03-06 15:22:42 -05:00
committed by Jennifer Wang
parent 1631c6ac8d
commit a59e1d5220
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
}