From 1ad9a8febda03436f3c38a1c99d54c580651a779 Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 25 Oct 2023 09:41:49 +0800 Subject: [PATCH] Update types/chain_id.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- types/chain_id.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/chain_id.go b/types/chain_id.go index e2a5f802ac9d..83ab9bcb3631 100644 --- a/types/chain_id.go +++ b/types/chain_id.go @@ -16,6 +16,8 @@ const ChainIDFieldName = "chain_id" // it still parses the values before the `chain_id` field, particularly if the `app_state` field is // before the `chain_id` field, it will parse the `app_state` value, user must make sure the `chain_id` // is put before `app_state` or other big entries to enjoy the efficiency. +// If the `chain_id` field is not found, the function will return an error. +func ParseChainIDFromGenesis(r io.Reader) (string, error) { func ParseChainIDFromGenesis(r io.Reader) (string, error) { dec := json.NewDecoder(r)