parent
dc3967ae7b
commit
62ef5a8dc7
2 changed files with 12 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"math/big"
|
||||
"testing"
|
||||
|
@ -177,6 +178,13 @@ func TestContractDeploy(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
checkFAULTState(t, res)
|
||||
})
|
||||
t.Run("non-utf8 manifest", func(t *testing.T) {
|
||||
manifB := bytes.Replace(manif1, []byte("TestMain"), []byte("\xff\xfe\xfd"), 1) // Replace name.
|
||||
|
||||
res, err := invokeContractMethod(bc, 11_00000000, mgmtHash, "deploy", nef1b, manifB)
|
||||
require.NoError(t, err)
|
||||
checkFAULTState(t, res)
|
||||
})
|
||||
t.Run("invalid manifest", func(t *testing.T) {
|
||||
pkey, err := keys.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue