mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 23:55:11 +00:00
oracle: add response codes to interop defintions
Client should be aware of them.
This commit is contained in:
parent
bba22cb736
commit
090d68f8fa
2 changed files with 28 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/core/native"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/native/nnsrecords"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/native/noderoles"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/crypto"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/gas"
|
||||
"github.com/nspcc-dev/neo-go/pkg/interop/native/ledger"
|
||||
|
@ -89,6 +90,18 @@ func TestCryptoLibNamedCurve(t *testing.T) {
|
|||
require.EqualValues(t, native.Secp256r1, crypto.Secp256r1)
|
||||
}
|
||||
|
||||
func TestOracleResponseCodes(t *testing.T) {
|
||||
require.EqualValues(t, oracle.Success, transaction.Success)
|
||||
require.EqualValues(t, oracle.ProtocolNotSupported, transaction.ProtocolNotSupported)
|
||||
require.EqualValues(t, oracle.ConsensusUnreachable, transaction.ConsensusUnreachable)
|
||||
require.EqualValues(t, oracle.NotFound, transaction.NotFound)
|
||||
require.EqualValues(t, oracle.Timeout, transaction.Timeout)
|
||||
require.EqualValues(t, oracle.Forbidden, transaction.Forbidden)
|
||||
require.EqualValues(t, oracle.ResponseTooLarge, transaction.ResponseTooLarge)
|
||||
require.EqualValues(t, oracle.InsufficientFunds, transaction.InsufficientFunds)
|
||||
require.EqualValues(t, oracle.Error, transaction.Error)
|
||||
}
|
||||
|
||||
type nativeTestCase struct {
|
||||
method string
|
||||
params []string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue