forked from TrueCloudLab/frostfs-node
Revert "[#1141] morph/client: Allow to use more integer types as arguments"
This reverts commit 9349f422fd
.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
4761857fb3
commit
df48ddcb3d
2 changed files with 3 additions and 10 deletions
|
@ -451,13 +451,13 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
|
|||
result.Type = sc.ByteArrayType
|
||||
case int:
|
||||
result.Type = sc.IntegerType
|
||||
result.Value = big.NewInt(int64(v))
|
||||
result.Value = int64(v)
|
||||
case int64:
|
||||
result.Type = sc.IntegerType
|
||||
result.Value = big.NewInt(v)
|
||||
result.Value = v
|
||||
case uint64:
|
||||
result.Type = sc.IntegerType
|
||||
result.Value = new(big.Int).SetUint64(v)
|
||||
result.Value = int64(v)
|
||||
case [][]byte:
|
||||
arr := make([]sc.Parameter, 0, len(v))
|
||||
for i := range v {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
sc "github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||
|
@ -21,12 +20,6 @@ func TestToStackParameter(t *testing.T) {
|
|||
{
|
||||
value: int64(100),
|
||||
expType: sc.IntegerType,
|
||||
expVal: big.NewInt(100),
|
||||
},
|
||||
{
|
||||
value: uint64(100),
|
||||
expType: sc.IntegerType,
|
||||
expVal: big.NewInt(100),
|
||||
},
|
||||
{
|
||||
value: "hello world",
|
||||
|
|
Loading…
Reference in a new issue