mirror of
https://github.com/status-im/go-waku.git
synced 2025-01-16 00:35:14 +00:00
fix: gossipsub parameters, and cancel() execution in wakunode2
This commit is contained in:
parent
279524f100
commit
d9a12bf079
@ -54,16 +54,16 @@ type GossipSubParams struct {
|
|||||||
// Dlo sets the lower bound on the number of peers we keep in a GossipSub topic mesh.
|
// Dlo sets the lower bound on the number of peers we keep in a GossipSub topic mesh.
|
||||||
// If we have fewer than Dlo peers, we will attempt to graft some more into the mesh at
|
// If we have fewer than Dlo peers, we will attempt to graft some more into the mesh at
|
||||||
// the next heartbeat.
|
// the next heartbeat.
|
||||||
Dlo *int `json:"dLow,omitempty"`
|
Dlo *int `json:"d_low,omitempty"`
|
||||||
|
|
||||||
// Dhi sets the upper bound on the number of peers we keep in a GossipSub topic mesh.
|
// Dhi sets the upper bound on the number of peers we keep in a GossipSub topic mesh.
|
||||||
// If we have more than Dhi peers, we will select some to prune from the mesh at the next heartbeat.
|
// If we have more than Dhi peers, we will select some to prune from the mesh at the next heartbeat.
|
||||||
Dhi *int `json:"dHigh,omitempty"`
|
Dhi *int `json:"d_high,omitempty"`
|
||||||
|
|
||||||
// Dscore affects how peers are selected when pruning a mesh due to over subscription.
|
// Dscore affects how peers are selected when pruning a mesh due to over subscription.
|
||||||
// At least Dscore of the retained peers will be high-scoring, while the remainder are
|
// At least Dscore of the retained peers will be high-scoring, while the remainder are
|
||||||
// chosen randomly.
|
// chosen randomly.
|
||||||
Dscore *int `json:"dScore,omitempty"`
|
Dscore *int `json:"d_score,omitempty"`
|
||||||
|
|
||||||
// Dout sets the quota for the number of outbound connections to maintain in a topic mesh.
|
// Dout sets the quota for the number of outbound connections to maintain in a topic mesh.
|
||||||
// When the mesh is pruned due to over subscription, we make sure that we have outbound connections
|
// When the mesh is pruned due to over subscription, we make sure that we have outbound connections
|
||||||
|
@ -433,8 +433,6 @@ func (w *WakuNode) Stop() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.cancel()
|
|
||||||
|
|
||||||
w.bcaster.Stop()
|
w.bcaster.Stop()
|
||||||
|
|
||||||
defer w.connectionNotif.Close()
|
defer w.connectionNotif.Close()
|
||||||
@ -465,6 +463,8 @@ func (w *WakuNode) Stop() {
|
|||||||
|
|
||||||
w.host.Close()
|
w.host.Close()
|
||||||
|
|
||||||
|
w.cancel()
|
||||||
|
|
||||||
w.wg.Wait()
|
w.wg.Wait()
|
||||||
|
|
||||||
close(w.enrChangeCh)
|
close(w.enrChangeCh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user