From 07dcc08ecb05cf22b5daf49f833212ebe504ea22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 4 Apr 2023 14:39:01 +0200 Subject: [PATCH] fix: make state compute --html work with unknown methods --- cli/state.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cli/state.go b/cli/state.go index 3099bff17..9031ba870 100644 --- a/cli/state.go +++ b/cli/state.go @@ -1268,7 +1268,7 @@ var compStateMsg = ` {{end}} {{if ne .MsgRct.ExitCode 0}} -
Error:
{{.Error}}
+
Exit:
{{.MsgRct.ExitCode}}
{{end}}
@@ -1372,7 +1372,14 @@ func isVerySlow(t time.Duration) bool { } func JsonParams(code cid.Cid, method abi.MethodNum, params []byte) (string, error) { - p, err := stmgr.GetParamType(consensus.NewActorRegistry(), code, method) // todo use api for correct actor registry + ar := consensus.NewActorRegistry() + + _, found := ar.Methods[code][method] + if !found { + return fmt.Sprintf("raw:%x", params), nil + } + + p, err := stmgr.GetParamType(ar, code, method) // todo use api for correct actor registry if err != nil { return "", err }