@@ -23,7 +23,7 @@ import (
23
23
ouroboros "github.com/blinklabs-io/gouroboros"
24
24
"github.com/blinklabs-io/gouroboros/protocol"
25
25
"github.com/blinklabs-io/gouroboros/protocol/handshake"
26
- "github.com/blinklabs-io/ouroboros-mock"
26
+ ouroboros_mock "github.com/blinklabs-io/ouroboros-mock"
27
27
"go.uber.org/goleak"
28
28
)
29
29
@@ -33,35 +33,32 @@ const (
33
33
mockProtocolVersionNtNV11 uint16 = 11
34
34
)
35
35
36
- var conversationEntryNtCResponse = ouroboros_mock.ConversationEntry {
37
- Type : ouroboros_mock .EntryTypeOutput ,
36
+ var conversationEntryNtCResponse = ouroboros_mock.ConversationEntryOutput {
38
37
ProtocolId : handshake .ProtocolId ,
39
38
IsResponse : true ,
40
- OutputMessages : []protocol.Message {
39
+ Messages : []protocol.Message {
41
40
handshake .NewMsgAcceptVersion (
42
41
mockProtocolVersionNtC ,
43
42
mockNtCVersionData (),
44
43
),
45
44
},
46
45
}
47
46
48
- var conversationEntryNtNResponse = ouroboros_mock.ConversationEntry {
49
- Type : ouroboros_mock .EntryTypeOutput ,
47
+ var conversationEntryNtNResponse = ouroboros_mock.ConversationEntryOutput {
50
48
ProtocolId : handshake .ProtocolId ,
51
49
IsResponse : true ,
52
- OutputMessages : []protocol.Message {
50
+ Messages : []protocol.Message {
53
51
handshake .NewMsgAcceptVersion (
54
52
mockProtocolVersionNtN ,
55
53
mockNtNVersionData (),
56
54
),
57
55
},
58
56
}
59
57
60
- var conversationEntryNtNResponseV11 = ouroboros_mock.ConversationEntry {
61
- Type : ouroboros_mock .EntryTypeOutput ,
58
+ var conversationEntryNtNResponseV11 = ouroboros_mock.ConversationEntryOutput {
62
59
ProtocolId : handshake .ProtocolId ,
63
60
IsResponse : true ,
64
- OutputMessages : []protocol.Message {
61
+ Messages : []protocol.Message {
65
62
handshake .NewMsgAcceptVersion (
66
63
mockProtocolVersionNtNV11 ,
67
64
mockNtNVersionDataV11 (),
@@ -232,11 +229,10 @@ func TestClientNtCRefuseVersionMismatch(t *testing.T) {
232
229
ouroboros_mock .ProtocolRoleClient ,
233
230
[]ouroboros_mock.ConversationEntry {
234
231
ouroboros_mock .ConversationEntryHandshakeRequestGeneric ,
235
- ouroboros_mock.ConversationEntry {
236
- Type : ouroboros_mock .EntryTypeOutput ,
232
+ ouroboros_mock.ConversationEntryOutput {
237
233
ProtocolId : handshake .ProtocolId ,
238
234
IsResponse : true ,
239
- OutputMessages : []protocol.Message {
235
+ Messages : []protocol.Message {
240
236
handshake .NewMsgRefuse (
241
237
[]any {
242
238
handshake .RefuseReasonVersionMismatch ,
@@ -267,11 +263,10 @@ func TestClientNtCRefuseDecodeError(t *testing.T) {
267
263
ouroboros_mock .ProtocolRoleClient ,
268
264
[]ouroboros_mock.ConversationEntry {
269
265
ouroboros_mock .ConversationEntryHandshakeRequestGeneric ,
270
- ouroboros_mock.ConversationEntry {
271
- Type : ouroboros_mock .EntryTypeOutput ,
266
+ ouroboros_mock.ConversationEntryOutput {
272
267
ProtocolId : handshake .ProtocolId ,
273
268
IsResponse : true ,
274
- OutputMessages : []protocol.Message {
269
+ Messages : []protocol.Message {
275
270
handshake .NewMsgRefuse (
276
271
[]any {
277
272
handshake .RefuseReasonDecodeError ,
@@ -303,11 +298,10 @@ func TestClientNtCRefuseRefused(t *testing.T) {
303
298
ouroboros_mock .ProtocolRoleClient ,
304
299
[]ouroboros_mock.ConversationEntry {
305
300
ouroboros_mock .ConversationEntryHandshakeRequestGeneric ,
306
- ouroboros_mock.ConversationEntry {
307
- Type : ouroboros_mock .EntryTypeOutput ,
301
+ ouroboros_mock.ConversationEntryOutput {
308
302
ProtocolId : handshake .ProtocolId ,
309
303
IsResponse : true ,
310
- OutputMessages : []protocol.Message {
304
+ Messages : []protocol.Message {
311
305
handshake .NewMsgRefuse (
312
306
[]any {
313
307
handshake .RefuseReasonRefused ,
0 commit comments