Skip to content

Commit

Permalink
Merge pull request #701 from ava-labs/deprecate-network-peer-list-gos…
Browse files Browse the repository at this point in the history
…sip-frequency

avoid using deprecate-network-peer-list-gossip-frequency flag
  • Loading branch information
felipemadero authored Feb 5, 2024
2 parents f804bbd + 1a07acd commit 8b809e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ The network-runner supports avalanchego node configuration at different levels.

```json
{
"network-peer-list-gossip-frequency":"250ms",
"network-max-reconnect-delay":"1s",
"public-ip":"127.0.0.1",
"health-check-frequency":"2s",
Expand Down Expand Up @@ -388,7 +387,7 @@ node99
You can also provide additional flags that specify the node's config:

```sh
--node-config '{"index-enabled":false, "api-admin-enabled":true,"network-peer-list-gossip-frequency":"300ms"}'
--node-config '{"index-enabled":false, "api-admin-enabled":true}'
```

`--node-config` allows to specify specific avalanchego config parameters to the new node. See [here](https://docs.avax.network/build/references/avalanchego-config-flags) for the reference of supported flags.
Expand Down
1 change: 0 additions & 1 deletion local/default/flags.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"network-peer-list-gossip-frequency":"250ms",
"network-max-reconnect-delay":"1s",
"public-ip":"127.0.0.1",
"health-check-frequency":"2s",
Expand Down
3 changes: 1 addition & 2 deletions utils/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

func TestSetJSONKey(t *testing.T) {
b := `{
"network-peer-list-gossip-frequency":"250ms",
"network-max-reconnect-delay":"1s",
"public-ip":"127.0.0.1",
"health-check-frequency":"2s",
Expand All @@ -33,7 +32,7 @@ func TestSetJSONKey(t *testing.T) {
err = json.Unmarshal([]byte(s), &m)
require.NoError(t, err)
// check if one-liner also works
bb := `{"api-admin-enabled":true,"db-dir":"/tmp/network-runner-root-data3856302950/node5/db-dir","health-check-frequency":"2s","index-enabled":true,"log-dir":"/tmp/network-runner-root-data3856302950/node5/log","log-display-level":"INFO","log-level":"INFO","network-max-reconnect-delay":"1s","network-peer-list-gossip-frequency":"250ms","plugin-dir":"/home/fabio/go/src/github.com/ava-labs/avalanchego/build/plugins","public-ip":"127.0.0.1","track-subnets":""}`
bb := `{"api-admin-enabled":true,"db-dir":"/tmp/network-runner-root-data3856302950/node5/db-dir","health-check-frequency":"2s","index-enabled":true,"log-dir":"/tmp/network-runner-root-data3856302950/node5/log","log-display-level":"INFO","log-level":"INFO","network-max-reconnect-delay":"1s","plugin-dir":"/home/fabio/go/src/github.com/ava-labs/avalanchego/build/plugins","public-ip":"127.0.0.1","track-subnets":""}`
ss, err := SetJSONKey(bb, "track-subnets", "d,e,f")
require.NoError(t, err)
require.Contains(t, s, `"track-subnets":"d,e,f"`)
Expand Down

0 comments on commit 8b809e2

Please sign in to comment.