You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Bytes returns the absolute value of x as a big-endian byte slice.func (x*Int) Bytes() []byte {
buf:=make([]byte, len(x.abs)*_S)
returnbuf[x.abs.bytes(buf):]
}
and when deserialize, the bigint just fill for big.NewInt(0), it's a positive number. So the negative sign is dropped.
I think it not in expectation
The text was updated successfully, but these errors were encountered:
marshal for bigint is like:
go-ipld-cbor/refmt.go
Lines 27 to 36 in e249008
but
i.Bytes()
would drop the sign for bignum!and when deserialize, the bigint just fill for
big.NewInt(0)
, it's a positive number. So the negative sign is dropped.I think it not in expectation
The text was updated successfully, but these errors were encountered: