未验证 提交 bd58098f 编写于 作者: B Balint Gabor 提交者: GitHub

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
上级 5d1d1a80
...@@ -44,7 +44,7 @@ const ( ...@@ -44,7 +44,7 @@ const (
// BzzSpec is the spec of the generic swarm handshake // BzzSpec is the spec of the generic swarm handshake
var BzzSpec = &protocols.Spec{ var BzzSpec = &protocols.Spec{
Name: "bzz", Name: "bzz",
Version: 6, Version: 7,
MaxMsgSize: 10 * 1024 * 1024, MaxMsgSize: 10 * 1024 * 1024,
Messages: []interface{}{ Messages: []interface{}{
HandshakeMsg{}, HandshakeMsg{},
...@@ -54,7 +54,7 @@ var BzzSpec = &protocols.Spec{ ...@@ -54,7 +54,7 @@ var BzzSpec = &protocols.Spec{
// DiscoverySpec is the spec for the bzz discovery subprotocols // DiscoverySpec is the spec for the bzz discovery subprotocols
var DiscoverySpec = &protocols.Spec{ var DiscoverySpec = &protocols.Spec{
Name: "hive", Name: "hive",
Version: 5, Version: 6,
MaxMsgSize: 10 * 1024 * 1024, MaxMsgSize: 10 * 1024 * 1024,
Messages: []interface{}{ Messages: []interface{}{
peersMsg{}, peersMsg{},
......
...@@ -31,7 +31,7 @@ import ( ...@@ -31,7 +31,7 @@ import (
) )
const ( const (
TestProtocolVersion = 6 TestProtocolVersion = 7
TestProtocolNetworkID = 3 TestProtocolNetworkID = 3
) )
......
...@@ -41,8 +41,8 @@ const ( ...@@ -41,8 +41,8 @@ const (
Mid Mid
High High
Top Top
PriorityQueue = 4 // number of priority queues - Low, Mid, High, Top PriorityQueue = 4 // number of priority queues - Low, Mid, High, Top
PriorityQueueCap = 128 // queue capacity PriorityQueueCap = 4096 // queue capacity
HashSize = 32 HashSize = 32
) )
...@@ -639,7 +639,7 @@ func (c *clientParams) clientCreated() { ...@@ -639,7 +639,7 @@ func (c *clientParams) clientCreated() {
// Spec is the spec of the streamer protocol // Spec is the spec of the streamer protocol
var Spec = &protocols.Spec{ var Spec = &protocols.Spec{
Name: "stream", Name: "stream",
Version: 5, Version: 6,
MaxMsgSize: 10 * 1024 * 1024, MaxMsgSize: 10 * 1024 * 1024,
Messages: []interface{}{ Messages: []interface{}{
UnsubscribeMsg{}, UnsubscribeMsg{},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册