Skip to content

Commit

Permalink
mobile: added constructor for BigInts (ethereum#17828)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgen-povt authored and karalabe committed Nov 29, 2018
1 parent 55a4ff8 commit a4428c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mobile/big.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ func (bi *BigInt) SetString(x string, base int) {
// BigInts represents a slice of big ints.
type BigInts struct{ bigints []*big.Int }

// NewBigInts creates a slice of uninitialized big numbers.
func NewBigInts(size int) *BigInts {
return &BigInts{
bigints: make([]*big.Int, size),
}
}

// Size returns the number of big ints in the slice.
func (bi *BigInts) Size() int {
return len(bi.bigints)
Expand Down

0 comments on commit a4428c5

Please sign in to comment.