First/Third party by genesis hash, not label. Make limit configurable and default to 1k (#424)

* First/Third party by genesis hash, not label. Make limit configurable

* Fix a test that relies on not being a node limit

* remove a now-invalid comment

* Cargo fmt

* Fix another naff comment

* Update backend/telemetry_core/src/state/chain.rs

Comment tweak

Co-authored-by: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
James Wilson
2021-10-13 13:08:53 +01:00
committed by GitHub
parent 82f0b234c4
commit 7ff9a316d1
6 changed files with 64 additions and 36 deletions
+4
View File
@@ -79,6 +79,9 @@ struct Opts {
/// messages in an attempt to let it reduce?
#[structopt(long)]
aggregator_queue_len: Option<usize>,
/// How many nodes from third party chains are allowed to connect before we prevent connections from them.
#[structopt(long, default_value = "1000")]
max_third_party_nodes: usize,
}
fn main() {
@@ -128,6 +131,7 @@ async fn start_server(num_aggregators: usize, opts: Opts) -> anyhow::Result<()>
AggregatorOpts {
max_queue_len: aggregator_queue_len,
denylist: opts.denylist,
max_third_party_nodes: opts.max_third_party_nodes,
},
)
.await?;