diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 33842d4cc..0df62c0af 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -235,13 +235,14 @@ func (a *EthModule) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthH } func (a *EthModule) parseBlkParam(ctx context.Context, blkParam string, strict bool) (tipset *types.TipSet, err error) { - switch blkParam { - case "earliest", "pending": - return nil, fmt.Errorf("block param %q is not supported", blkParam) + if blkParam == "earliest" { + return nil, fmt.Errorf("block param \"earliest\" is not supported") } head := a.Chain.GetHeaviestTipSet() switch blkParam { + case "pending": + return head, nil case "latest": parent, err := a.Chain.GetTipSetFromKey(ctx, head.Parents()) if err != nil {