vm: make NewBigInteger accept *big.Int
It creates big.Int internally anyway, so this is the most flexible way.
This commit is contained in:
parent
9586af32f2
commit
3831aec53f
7 changed files with 45 additions and 43 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -438,7 +439,7 @@ func parseArgs(args []string) ([]vm.StackItem, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items[i] = vm.NewBigIntegerItem(val)
|
||||
items[i] = vm.NewBigIntegerItem(big.NewInt(val))
|
||||
case stringType:
|
||||
items[i] = vm.NewByteArrayItem([]byte(value))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue