core: replace open-coded PUSHBYTES64 with the one from opcode

This commit is contained in:
Roman Khimov 2019-12-03 17:54:47 +03:00
parent 141d27795e
commit 31add423a8

View file

@ -15,6 +15,7 @@ import (
"github.com/CityOfZion/neo-go/pkg/io" "github.com/CityOfZion/neo-go/pkg/io"
"github.com/CityOfZion/neo-go/pkg/smartcontract" "github.com/CityOfZion/neo-go/pkg/smartcontract"
"github.com/CityOfZion/neo-go/pkg/util" "github.com/CityOfZion/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/vm/opcode"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@ -84,8 +85,7 @@ func newBlock(index uint32, txs ...*transaction.Transaction) *Block {
if err != nil || len(sig) != 64 { if err != nil || len(sig) != 64 {
panic(err) panic(err)
} }
// 0x40 is PUSHBYTES64 invScript = append(invScript, byte(opcode.PUSHBYTES64))
invScript = append(invScript, 0x40)
invScript = append(invScript, sig...) invScript = append(invScript, sig...)
} }
b.Script.InvocationScript = invScript b.Script.InvocationScript = invScript