From 9f364f451699abca5fab1c02797a038b6086064a Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Wed, 23 Mar 2022 11:30:35 +0000 Subject: [PATCH] fixup! go/oasis-node/cmd/control: Add runtime-status --- go/oasis-node/cmd/control/runtime_stats.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/oasis-node/cmd/control/runtime_stats.go b/go/oasis-node/cmd/control/runtime_stats.go index 2172912d44f..695362400b1 100644 --- a/go/oasis-node/cmd/control/runtime_stats.go +++ b/go/oasis-node/cmd/control/runtime_stats.go @@ -223,6 +223,15 @@ func doRuntimeStats(cmd *cobra.Command, args []string) { //nolint:gocyclo endHeight = uint64(blk.Height) } + chainCtx, err := consensus.GetChainContext(ctx) + if err != nil { + logger.Error("failed to get chain context", + "err", err, + ) + os.Exit(1) + } + signature.SetChainContext(chainCtx) + logger.Info("gathering statistics", "rumtime_id", runtimeID, "start_height", startHeight,