Apply suggestions from code review

Co-authored-by: Eduard S. <eduard@iden3.io>
This commit is contained in:
arnau
2020-08-06 12:47:32 +02:00
committed by arnaucube
parent 16555b51e3
commit 2109d9f1cf
2 changed files with 2 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ func (idx Idx) BigInt() *big.Int {
// IdxFromBigInt converts a *big.Int to Idx type
func IdxFromBigInt(b *big.Int) (Idx, error) {
if b.Int64() > 4294967295 { // 2**32-1
if b.Int64() > 0xffffffff { // 2**32-1
return 0, ErrNumOverflow
}
return Idx(uint32(b.Int64())), nil