Skip to content

Commit bd58098

Browse files
authored
swarm: Chunk refactor improvements (#17683)
* swarm/network: Protocol bump (for chunk refactor) * swarm/network: Increase discovery and stream protocol version too * swarm/network: Increase priority queue cap
1 parent 5d1d1a8 commit bd58098

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

swarm/network/protocol.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444
// BzzSpec is the spec of the generic swarm handshake
4545
var BzzSpec = &protocols.Spec{
4646
Name: "bzz",
47-
Version: 6,
47+
Version: 7,
4848
MaxMsgSize: 10 * 1024 * 1024,
4949
Messages: []interface{}{
5050
HandshakeMsg{},
@@ -54,7 +54,7 @@ var BzzSpec = &protocols.Spec{
5454
// DiscoverySpec is the spec for the bzz discovery subprotocols
5555
var DiscoverySpec = &protocols.Spec{
5656
Name: "hive",
57-
Version: 5,
57+
Version: 6,
5858
MaxMsgSize: 10 * 1024 * 1024,
5959
Messages: []interface{}{
6060
peersMsg{},

swarm/network/protocol_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
)
3232

3333
const (
34-
TestProtocolVersion = 6
34+
TestProtocolVersion = 7
3535
TestProtocolNetworkID = 3
3636
)
3737

swarm/network/stream/stream.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const (
4141
Mid
4242
High
4343
Top
44-
PriorityQueue = 4 // number of priority queues - Low, Mid, High, Top
45-
PriorityQueueCap = 128 // queue capacity
44+
PriorityQueue = 4 // number of priority queues - Low, Mid, High, Top
45+
PriorityQueueCap = 4096 // queue capacity
4646
HashSize = 32
4747
)
4848

@@ -639,7 +639,7 @@ func (c *clientParams) clientCreated() {
639639
// Spec is the spec of the streamer protocol
640640
var Spec = &protocols.Spec{
641641
Name: "stream",
642-
Version: 5,
642+
Version: 6,
643643
MaxMsgSize: 10 * 1024 * 1024,
644644
Messages: []interface{}{
645645
UnsubscribeMsg{},

0 commit comments

Comments
 (0)