forked from TrueCloudLab/neoneo-go
d9400800e3
It essentialy is the new SystemFee, so use that. Had to increase GAS transfer in test chain to 1000 to pay for deployment.
25 lines
567 B
Go
25 lines
567 B
Go
package transaction
|
|
|
|
import (
|
|
"encoding/hex"
|
|
"testing"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/internal/testserdes"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestInvocationZeroScript(t *testing.T) {
|
|
// Zero-length script.
|
|
in, err := hex.DecodeString("000000000000000000")
|
|
require.NoError(t, err)
|
|
|
|
inv := &InvocationTX{}
|
|
assert.Error(t, testserdes.DecodeBinary(in, inv))
|
|
|
|
// PUSH1 script.
|
|
in, err = hex.DecodeString("01510000000000000000")
|
|
require.NoError(t, err)
|
|
|
|
assert.NoError(t, testserdes.DecodeBinary(in, inv))
|
|
}
|