diff --git a/mobile/config.go b/mobile/config.go index 89bc792f..47b56887 100644 --- a/mobile/config.go +++ b/mobile/config.go @@ -54,16 +54,16 @@ type GossipSubParams struct { // 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 // 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. // 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. // At least Dscore of the retained peers will be high-scoring, while the remainder are // 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. // When the mesh is pruned due to over subscription, we make sure that we have outbound connections diff --git a/waku/v2/node/wakunode2.go b/waku/v2/node/wakunode2.go index c86672ce..2b4f493a 100644 --- a/waku/v2/node/wakunode2.go +++ b/waku/v2/node/wakunode2.go @@ -433,8 +433,6 @@ func (w *WakuNode) Stop() { return } - w.cancel() - w.bcaster.Stop() defer w.connectionNotif.Close() @@ -465,6 +463,8 @@ func (w *WakuNode) Stop() { w.host.Close() + w.cancel() + w.wg.Wait() close(w.enrChangeCh)