Skip to content

Commit

Permalink
pkg/serialize: fix decode error omitting code (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchappelow authored and brennanjl committed Feb 26, 2024
1 parent 04560f3 commit 921673c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/serialize/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Decode[T any](bts SerializedData) (*T, error) {
case encodingTypeRLP:
return decodeRLP[T](val)
default:
return nil, fmt.Errorf("invalid encoding type: %d", val)
return nil, fmt.Errorf("invalid encoding type: %d", encType)
}
}

Expand Down Expand Up @@ -160,6 +160,6 @@ func DecodeInto(bts []byte, v any) error {
case encodingTypeRLP:
return rlp.DecodeBytes(val, v)
default:
return fmt.Errorf("invalid encoding type: %d", val)
return fmt.Errorf("invalid encoding type: %d", encType)
}
}

0 comments on commit 921673c

Please sign in to comment.