diff --git a/cmd/chain.go b/cmd/chain.go index 537fe733f2..a97d32c8e0 100644 --- a/cmd/chain.go +++ b/cmd/chain.go @@ -414,7 +414,7 @@ var chainExportCmd = &cmds.Command{ // // It always gets the head from the API so commands use a consistent tipset even if time pases. func LoadTipSet(ctx context.Context, req *cmds.Request, chainAPI v1api.IChain) (*types.TipSet, error) { - tss := req.Options["tipset"].(string) + tss, _ := req.Options["tipset"].(string) if tss == "" { return chainAPI.ChainHead(ctx) } diff --git a/cmd/state.go b/cmd/state.go index 80185178b4..f762dddd89 100644 --- a/cmd/state.go +++ b/cmd/state.go @@ -792,7 +792,8 @@ var StateComputeStateCmd = &cmds.Command{ var ts *types.TipSet var err error chainAPI := getEnv(env).ChainAPI - if tss := req.Options["tipset"].(string); tss != "" { + tss, _ := req.Options["tipset"].(string) + if tss != "" { ts, err = ParseTipSetRef(ctx, chainAPI, tss) } else if height > 0 { ts, err = chainAPI.ChainGetTipSetByHeight(ctx, height, types.EmptyTSK)