From 232da1bf1ade7817f53d2e4ab45ff2c9e5af6450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= Date: Tue, 13 Feb 2024 15:11:42 +0100 Subject: [PATCH] Fix tests --- types/rlp_unmarshal.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/types/rlp_unmarshal.go b/types/rlp_unmarshal.go index 3743a151a6..fef4710627 100644 --- a/types/rlp_unmarshal.go +++ b/types/rlp_unmarshal.go @@ -386,8 +386,12 @@ func (t *Transaction) UnmarshalRLP(input []byte) error { type rlpValues []*fastrlp.Value -func (r rlpValues) dequeueValue() *fastrlp.Value { - val := r[0] - r = r[1:] +func (r *rlpValues) dequeueValue() *fastrlp.Value { + if len(*r) == 0 { + return nil + } + val := (*r)[0] + *r = (*r)[1:] + return val }