Skip to content

Commit

Permalink
fiix bakcport error #10427
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Mar 10, 2023
1 parent 99749e9 commit 80cba5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion node/impl/full/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ func (a *EthModule) parseBlkParam(ctx context.Context, blkParam string, strict b
if err != nil {
return nil, fmt.Errorf("cannot parse block number: %v", err)
}
ts, err := a.Chain.GetTipsetByHeight(ctx, abi.ChainEpoch(num), nil, true)
if abi.ChainEpoch(num) > head.Height()-1 {
return nil, fmt.Errorf("requested a future epoch (beyond 'latest')")
}
ts, err := a.ChainAPI.ChainGetTipSetByHeight(ctx, abi.ChainEpoch(num), head.Key())
if err != nil {
return nil, fmt.Errorf("cannot get tipset at height: %v", num)
}
Expand Down

0 comments on commit 80cba5f

Please sign in to comment.