native: use CreateOracleResponseScript directly

It wasn't possible way back when this test was written
(CreateOracleResponseScript was a method), now we can simplify things.
This commit is contained in:
Roman Khimov 2022-07-26 09:15:40 +03:00
parent f749aaff3c
commit c8ff489287

View file

@ -15,7 +15,6 @@ import (
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/neotest"
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
"github.com/stretchr/testify/require"
)
@ -79,8 +78,7 @@ func TestOracle_Request(t *testing.T) {
// Finish.
prepareResponseTx := func(t *testing.T, requestID uint64) *transaction.Transaction {
script, err := smartcontract.CreateCallScript(oracleCommitteeInvoker.Hash, "finish")
require.NoError(t, err)
script := native.CreateOracleResponseScript(oracleCommitteeInvoker.Hash)
tx := transaction.New(script, 1000_0000)
tx.Nonce = neotest.Nonce()