From 66ee9422f56626dccc94b00762b8991c9b3195b0 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:12:26 +0100 Subject: [PATCH] consensus/clique: fix block number unmarshal (#23961) * clique: fix block number unmarshal * clique: rename --- consensus/clique/api.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consensus/clique/api.go b/consensus/clique/api.go index 03f2daffa0..cb270d321d 100644 --- a/consensus/clique/api.go +++ b/consensus/clique/api.go @@ -196,7 +196,11 @@ func (sb *blockNumberOrHashOrRLP) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &input); err != nil { return err } - sb.RLP = hexutil.MustDecode(input) + blob, err := hexutil.Decode(input) + if err != nil { + return err + } + sb.RLP = blob return nil }