switch to ChainAPI#ChainGetTipSetByHeight.

This commit is contained in:
Raúl Kripalani 2023-03-09 18:51:38 +00:00
parent 13d6211ed0
commit fce0813821

View File

@ -257,7 +257,7 @@ func (a *EthModule) parseBlkParam(ctx context.Context, blkParam string, strict b
if abi.ChainEpoch(num) > head.Height()-1 { if abi.ChainEpoch(num) > head.Height()-1 {
return nil, fmt.Errorf("requested a future epoch (beyond 'latest')") return nil, fmt.Errorf("requested a future epoch (beyond 'latest')")
} }
ts, err := a.Chain.GetTipsetByHeight(ctx, abi.ChainEpoch(num), nil, true) ts, err := a.ChainAPI.ChainGetTipSetByHeight(ctx, abi.ChainEpoch(num), head.Key())
if err != nil { if err != nil {
return nil, fmt.Errorf("cannot get tipset at height: %v", num) return nil, fmt.Errorf("cannot get tipset at height: %v", num)
} }