mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 12:36:48 +00:00
mobile: added constructor for BigInts (#17828)
This commit is contained in:
parent
55a4ff806f
commit
a4428c505e
1 changed files with 7 additions and 0 deletions
|
|
@ -84,6 +84,13 @@ func (bi *BigInt) SetString(x string, base int) {
|
||||||
// BigInts represents a slice of big ints.
|
// BigInts represents a slice of big ints.
|
||||||
type BigInts struct{ bigints []*big.Int }
|
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.
|
// Size returns the number of big ints in the slice.
|
||||||
func (bi *BigInts) Size() int {
|
func (bi *BigInts) Size() int {
|
||||||
return len(bi.bigints)
|
return len(bi.bigints)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue