diff --git a/pkg/encoding/bigint/bigint.go b/pkg/encoding/bigint/bigint.go index 9b77fae65..ed562821d 100644 --- a/pkg/encoding/bigint/bigint.go +++ b/pkg/encoding/bigint/bigint.go @@ -19,6 +19,9 @@ func FromBytes(data []byte) *big.Int { n := new(big.Int) size := len(data) if size == 0 { + if data == nil { + panic("nil slice provided to `FromBytes`") + } return big.NewInt(0) }