mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
Merge pull request #997 from nspcc-dev/neo3/protocol/fix
network: remove outdated fields
This commit is contained in:
commit
ad74cd7273
1 changed files with 14 additions and 9 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/block"
|
"github.com/nspcc-dev/neo-go/pkg/core/block"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/internal/testserdes"
|
"github.com/nspcc-dev/neo-go/pkg/internal/testserdes"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/network/capability"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/network/payload"
|
"github.com/nspcc-dev/neo-go/pkg/network/payload"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
@ -17,13 +18,17 @@ func TestEncodeDecodeVersion(t *testing.T) {
|
||||||
expected := NewMessage(CMDVersion, &payload.Version{
|
expected := NewMessage(CMDVersion, &payload.Version{
|
||||||
Magic: 1,
|
Magic: 1,
|
||||||
Version: 2,
|
Version: 2,
|
||||||
Services: 1,
|
|
||||||
Timestamp: uint32(time.Now().UnixNano()),
|
Timestamp: uint32(time.Now().UnixNano()),
|
||||||
Port: 1234,
|
|
||||||
Nonce: 987,
|
Nonce: 987,
|
||||||
UserAgent: []byte{1, 2, 3},
|
UserAgent: []byte{1, 2, 3},
|
||||||
|
Capabilities: capability.Capabilities{
|
||||||
|
{
|
||||||
|
Type: capability.FullNode,
|
||||||
|
Data: &capability.Node{
|
||||||
StartHeight: 123,
|
StartHeight: 123,
|
||||||
Relay: true,
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
testserdes.EncodeDecode(t, expected, &Message{})
|
testserdes.EncodeDecode(t, expected, &Message{})
|
||||||
uncompressed, err := testserdes.EncodeBinary(expected.Payload)
|
uncompressed, err := testserdes.EncodeBinary(expected.Payload)
|
||||||
|
|
Loading…
Reference in a new issue