Skip to content

Commit 54f1a67

Browse files
authored
Merge pull request #172 from urnetwork/usability-fixes
Usability fixes
2 parents 7cd54a9 + b16cec9 commit 54f1a67

16 files changed

Lines changed: 282 additions & 90 deletions

connect.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ const MaxMultihopLength = 8
2222
// Most clients need to be able to read v2 before we turn this on.
2323
const DefaultProtocolVersion = 2
2424

25+
// v1: the first versioned stream version
26+
//
27+
// this version requires that TransferPath allow simultaneous source, destination, and stream ids
28+
const DefaultStreamVersion = 1
29+
2530
// id for message to/from the platform
2631
var ControlId = Id{}
2732

ip_remote_multi_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ func (self *multiClientChannel) SendDetailedWithAck(parsedPacket *parsedPacket,
27702770
}
27712771

27722772
var opts []any
2773-
if self.performanceProfile.AllowDirect {
2773+
if self.performanceProfile != nil && self.performanceProfile.AllowDirect {
27742774
opts = append(opts, ForceStream())
27752775
}
27762776
if !ack {
@@ -2804,7 +2804,7 @@ func (self *multiClientChannel) SendDetailedMessage(message proto.Message, timeo
28042804
return false, err
28052805
} else {
28062806
var opts []any
2807-
if self.performanceProfile.AllowDirect {
2807+
if self.performanceProfile != nil && self.performanceProfile.AllowDirect {
28082808
opts = append(opts, ForceStream())
28092809
}
28102810
return self.client.SendMultiHopWithTimeoutDetailed(

ip_remote_multi_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func TestMultiClientChannelWindowStats(t *testing.T) {
244244
}
245245
assert.Equal(t, nil, err)
246246

247-
clientChannel, err := newMultiClientChannel(ctx, channelArgs, generator, clientReceivePacket, DefaultIngressSecurityPolicy(), contractStatus, settings)
247+
clientChannel, err := newMultiClientChannel(ctx, channelArgs, generator, clientReceivePacket, DefaultIngressSecurityPolicy(), contractStatus, nil, settings)
248248
assert.Equal(t, nil, err)
249249

250250
cancelCtxs := []context.Context{}

ip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func testingNewClient(ctx context.Context, providerClient *Client, receivePacket
237237
RequireMultiHopId(providerClient.ClientId()),
238238
},
239239
protocol.ProvideMode_Network,
240-
)
240+
), nil
241241
}
242242

243243
// test with all sequence buffer sizes set to 0

protocol/audit.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/extender.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/frame.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/ip.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/test.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/transfer.pb.go

Lines changed: 16 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)