neoneo-go/pkg/core/transaction/invocation_test.go
Roman Khimov d9400800e3 transaction: drop Gas field from InvocationTX
It essentialy is the new SystemFee, so use that. Had to increase GAS transfer
in test chain to 1000 to pay for deployment.
2020-06-05 19:20:16 +03:00

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))
}