diff options
author | Eugene Valeyev <evgen.povt@gmail.com> | 2018-11-29 18:02:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-11-29 18:02:31 +0800 |
commit | a4428c505e84aaa1982d4cc522e0c0ffe608890a (patch) | |
tree | 280a682c4219e18d13f740abb56ac8b670e12a42 | |
parent | 55a4ff806fc1c8018055c56abcc6857502447902 (diff) | |
download | dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar.gz dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar.bz2 dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar.lz dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar.xz dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.tar.zst dexon-a4428c505e84aaa1982d4cc522e0c0ffe608890a.zip |
mobile: added constructor for BigInts (#17828)
-rw-r--r-- | mobile/big.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mobile/big.go b/mobile/big.go index dd7b15878..86ea93245 100644 --- a/mobile/big.go +++ b/mobile/big.go @@ -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) |