mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
native: allow to set candidate register price
This commit is contained in:
parent
b780a64b4d
commit
27fc28bd69
5 changed files with 84 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/internal/random"
|
||||
|
@ -46,7 +47,10 @@ func testGetSet(t *testing.T, chain *Blockchain, hash util.Uint160, name string,
|
|||
|
||||
if maxValue != 0 {
|
||||
t.Run("set, too large value", func(t *testing.T) {
|
||||
res, err := invokeContractMethodGeneric(chain, 100000000, hash, setName, true, maxValue+1)
|
||||
// use big.Int because max can be `math.MaxInt64`
|
||||
max := big.NewInt(maxValue)
|
||||
max.Add(max, big.NewInt(1))
|
||||
res, err := invokeContractMethodGeneric(chain, 100000000, hash, setName, true, max)
|
||||
require.NoError(t, err)
|
||||
checkFAULTState(t, res)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue